The best way of switching between in game physics and no physics.

Hi,

I wanted to ask about a situation I’m having and what the best way to implement it is. I have a bomb and a flying enemy. I want to the bomb attach itself to the flying enemy. This I’ve done with a collision box acting as a trigger on the flying enemy and the bomb having a collision box and rigidbody with the is trigger unchecked.

What I then want to happen is when the bomb explodes, I want the flying enemy to drop to the ground/platform using a rigidbody preferably. But it just goes straight through the items which it’s meant to collide with. Is it just a simple case of, in code unchecking the isTrigger box and creating a rigid body? Otherwise is there a way I can access what reaction the physics body would give and then just apply that in code instead?

Cheers,

Lukas

Check that you have Collision Detection set to Continuous Dynamic under your Rigidbody settings.

Having this option selected ensures the game engine continually checks for a collision. I had the same issue when I just started to touch base on the Rigidbody aspect of Unity3d.