- Home /
Move another cube with a cube
Hi everyone! I have some problem with rigibody. I want make it work like image below, and only want use rigibody make it work like that, without bouncing after pushed by another cube. If can't do that, please help me write code. Thank you so much! P/S: Sorry! my English is bad.
Thank you, can you tell me variable of Rigibody and box colliers? Because after it was bouncing up and station and not move horizontally cube2
Reduce friction on the ground surface and increase mass of the cubes.
you shouldn't allow to collide rigidbodies! you can use second collider ,larger than your rigid body, and when this collider is trigered you should set your cubes position and velocities. it is going to seem collision whic you want.
this is kind of trick but i think it is going to work
Answer by mustafakemal · May 03, 2015 at 04:39 PM
I think you have a problem with Newton :D Because you have 2 rigidbody and you want to collide these and than to glue them each other. In real World this is imposible with rigidbody. But you can do it what you want in Unity.
You should detect collision. When collision is detected, you make your cubes velocities equal. You can do this via script to reach rigidbodies velocities directly. Before do these things you must know what you want exactly. You must think motions of cubes after gluing process.