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.
kindeyegames
Creator of
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.
First, check that it shows up ok in https://sandbox.babylonjs.com/
If that doesn't work, try importing to blender 3D tool and exporting as GLB.
Which version of the plug-In are you using?
If the above does not work, can you please share the GLTF file (I use sendgb.com for sharing)
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:
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/343369/load-model-ace-load...
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.
https://kindeyegames.itch.io/c3-3dobject-alpha/devlog/378151/fix-gltf-import-add...
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.
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/
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