cube keeps falling through plane

I have two cubes on of them is controlled by the player. The problem is im using the ontrigger in order to detect if the cube hit the other. If it did it loses life the problem is when the ontrigger is on it just falls through the floor or plane. The only way it will not fall is if i check “is kinematic” but i was the cube to collide with the other one not just float through it. Is there a way to fix this ??Im new to unity so im not too sure

I assume your using a RigidBody for collision detection and to make them move and bounce? If its a RigidBody (3d version) Just uncheck UseGravity in the Editor. If your Using a RigidBody2D change GravityScale from 1 to 0. This will make gravity not work on the object, but all the other physics still works.

Note: Also keep IsKinematic UNCHECKED. You want them to bounce off each other.

im using just a rigid body not the 2d or 3d one and im using OnTriggerEnter() to check the collision when on trigger is tunred on they just fall through the floor but when i turn it off they stick to the floor

RigidBody is the 3D… Just uncheck UseGravity. Or did you need gravity acting upon them?

yes becuase i want them to hit each other. I dont want the cube to go through the other cube

I actually got it to work I used OnCollisionEnter instead of ontrigger that did the trick

Was just about to suggest that.

If you set an object to be a trigger you effectively also disable normal collision detection.