Not sure of a good way to do this, except to change 3D Camera angle or if you want it as a HUD, but it in a two 2D layer with 0 parallax.
Recent community posts
You are welcome and good luck with your game, looks interesting! Looking forward to seeing the 3D models in the game. To me it seemed like the origin was the issue, I don't know if blender and max handle that differently. Perhaps it's something else though if you don't do any origin changes in blender before export and that just works.
It looks like the origin/center of your model is far from the center of mass. I imported the glb into blender and set the origin to the center of mass of the object, exported it again and it appears fine in a simple example project.
Generally you’ll need to use things like angle(player.x, player.y, object.x, object.y) to get angle between player and object and apply it to the 3DObjext rotate ACE. It’s not really like Unity, you need to use C3 events and ACEs.
Can you share your project, so I can see what it is doing (I use sendgb.com to send files)? On an iPhone I get around 40 starships rendered before I start dropping below 60fps. On desktop about 10X performance. I am planning on looking at this in more detail next week to see if there are optimizations to be done for some mobile devices.
You can - see this dev post for some discussion on it:
In general, I don't really recommend it unless you have a good use case, since it can cause some confusion or extra memory usage if doing duplicated models (each instance will require storing all the model's textures.)
Can you say why you need to implement your game in this way?
Another fix to support the original Blockbench gltf file with data URIs, try it out and let me know if it works for you.
One fix was added here: https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/378121/fix-glb-import-fix-...
This should make the glb files work (also thanks to Zaykoworks for the additional idea for a workaround.)
In the above post, I also noted why the original gltf files do not currently work, so please continue using the converted glb versions for now. I now also have a good example Blockbench gltf file to work with to see if I can support it.
Thank you! I look forward to seeing your other projects.
Also if you any specific requests for features or changes let me know. The most valuable feedback I get is from active devs who release!
Nice work! I really like the theme, retro gfx, and cool level design in C3. Of course bonus points for using 3DObject :)
Can I share a link to this project on the 3DObject itch page (I want to start building a 'Showcase' section of the page)?
It looks like this model does not actually have a diffuse texture/material on the model, just an emissive texture (as the add-on notes mention, only diffuse / albedo texture is supported.)
I suggest either adding a diffuse texture to the model in a 3d tool like belnder or using a different model.
You can check out model /material properties by loading into: https://sandbox.babylonjs.com/
Please try the updated plug-in 2-24-1, it should now handle files without names for the images (which was the case for the link you provided, thanks for providing the link.)
Here's an example project with the above model, which works for me with the latest plug-in.
No, that would be a huge number of points for any kind of complicated shape and you would need to create a 3d representation of the shape to check on the intersection.
This is why most simple 3D engines use much simpler 3d colliders, like boxes, spheres, and capsules to use as collision shapes (broad phase collision detection). After that, if a more precise collision detection is needed, it gets complicated quickly, making a more precise representation of the object and checking for the intersection. I suggest starting simple first, adjusting the bounding box up or down a little to see if it is good enough.
If you need much more precision, you might think about moving to a full 3D engine (Unity, Unreal, etc.) that can implement mesh colliders.
I can add expressions for the size of the bounding box in 3D coordinates (min x,y,z, and max x,y,z). From this, you could create an axis-aligned 3D bounding box and do rough AABB collision detection: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection
You have to implement a 3D collision system yourself, C3 does not have support for this. I have seen and implemented examples of using collision filtering based on zElevation. More complex is to use a 3d collision JS library like cannon.js or simpler AABB bounding box collision in JS or C3 events. JS implementation is described here: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection