I have a gold coin mesh that i want to spawn on enemy death. That works but id like for it to move when spawned so i added physics and gravity. It falls straight through the landscape. Ive Googled around a bit and I’ve seen some things like turning on CCD and collision, setting the mesh to block all, and adding a separate Collision box to the mesh that is not a child of anything but the root component. I’ve read a little bit how the different Collision types interact with each other but no matter what I do, the coin just keeps falling through the landscape. What’s interesting is sometimes it works sometimes it doesn’t. I think I’ve got it to where about 80% of the time it’ll land on the landscape but I just can’t figure out for the life of me why some of them are falling through. The landscape collision blocks all. Any help at all is appreciated!
- Have you tried spawning it a bit higher? Just to be sure its not colliding as it spawns.
- you place on in the level, does it also fall through on play?
Attempted to spawn a bit higher seemed to help, but now it acts as if the collision capsule is falling off of some of them and the gold coin just gets kicked around instead of getting picked up. Only happens to some of them. Placing it on the ground with physics enabled, it does not move but some still fall through. Its the darndest thing.
Did you add collision directly to the mesh (blender/3DSM, SM Editor)?
The mesh has to have it’s own derived collision. You can use a collision component, but it needs to be the Root and the mesh a child. Doing so also means that the collision shape is what will be used for the actual physics interaction.
Furthermore, you need to enable query and physics collision.
You cannot use the “Use Complex as Simple” collision setting.
You also cannot scale down the mesh.
Demo it with a default cube mesh. When it’s working right swap out the mesh.
Very excellent! Its a marketplace asset. A coin i found in an asset pack i bough, so i didnt do the work myself in blender, maya, etc. Im gonna take your advice here and report back. Thanks for the tips!