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.

Add rigidbodies and box colliders to both cubes.

–

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

–

you are doing something wrong

–

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.

–

1 Answer

1

I think you have a problem with Newton :smiley: 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.