- Home /
Colliding without gravity
Hi! My first problem I bother you here ;) concludes colliders and gravity. I'm making a program, where the player just moves a cube with up and down arrow keys, and there's a plane below the cube. How can I stop the cube passing through the plane? With Rigidbody colliding will success but gravitation comes alongside. And I don't want another operators than player to affect the position of the cube. Should I use somekind of a script? Thank You for any help! :)
Turn off the Use Gravity option in your rigidbody settings in the inspector panel.
Do you have a collider on your plane and cube? That should stop them from going through eachother.
Answer by Pawscal · May 27, 2014 at 07:52 PM
First, make sure there is a collider on your Cube, Second, make sure you add a rigid body to your cube, third, make sure you checked "IsKinematic" on the properties of your rigid body.
hope it works
Answer by Patrick Lindberg · May 28, 2014 at 05:43 PM
When I turn on "IsKinematic", the cube passes through the plane. When I turn off the Gravity option, the cube starts to float when the player doesn't use the controls. Both, the cube and the plane, have colliders.
Your answer
Follow this Question
Related Questions
Colliders Not Working 1 Answer
Multiple Colliders 1 Answer
Ragdoll with multiple colliders 0 Answers
Objects rotating after falling on another object with Physics & Gravity? 1 Answer