Cube movement issues

I have a top down game so far involving a cube moving across the top of another resized cube, i have a script attached to the cube to allow X and Z movement, i have attached a rigidbody as i want the cube to have certain physics, unfortunately with the rigidbody my cube ends up flipping over sometimes as i’m moving it and causes the control to mess up

I would like the cube to be able to move without be able to rotation on any axis but if it were to collide with a moving block for example then it would be thrown as if it had physics attached to it but there would still be no rotation.

I hope this makes at least a little sense to someone :stuck_out_tongue:

Also some pictures that might give a better idea of what i mean.

352731--12260--$unityexample1_104.jpg
352731--12261--$unityexample_420.jpg

On the RigidBody component, there is a “Freeze Rotation” checkbox. That may be what you need.

Unfortunately when i tell it to freeze rotation it doesn’t collide with moving blocks :frowning: sorry should have mentioned this in my first post

Ahh, sorry then. I haven’t played with the physics engine too much so I don’t know what else to do. Maybe force its rotation values in the Update or LastUpdate?

Don’t know much about coding, i can look at a script and edit certain things but still very confusing :stuck_out_tongue: