Hi all,
I have two objects one is floor and another one is table. I want to apply gravity on table. means when ever i am dragging upwards, After leaving the table, will fall down up to that floor.
I have added table to rigidbody. in that i enable the check box of gravity.
After then i played. my table is going down…
How can i control my table up to that floor.
can i get any idea.
thanks
shankar
1 Answer
1
If I understand correctly, when you press play, the table falls due to gravity, correct? And you want it to stop when it hits the floor?
If so, add colliders to the table and the floor. When an object with a rigidbody and a collider component hits another object with a collider component, it will stop/bounce/etc.
If your table is a custom mesh, add a mesh collider. If it’s a collection of boxes/cylinders/whatever, add relevant colliders to all the pieces.
The floor could probably use just a box collider.
Hope that helps.
Means, Ur told me to add box colliers to both floor and table. and write script. that's it?
– ShankarYou don't need any script if all you want to do is simulate gravity and collisions... Unity will do it for you.
– SergeantBiscuits