Pushable Blocks

I am designing a puzzle in which you have to push 4 different size blocks to make steps to climb over a wall.

How can I make the blocks pushable without having the blocks topple over?

Well, I guess you could first check for a collision between the character and the cube object, and translate the block's transform toward the opposite axis it was touched from.

But moving a block just because it has been touched seems a bit too unnatural and scary, so you might want to have some kind of variable checking for how long is the player pushing toward the block, say, 1-2 seconds? If such happens, start moving the block as said above.

If you have problems with something you can always make specific questions here, or check the docs for collision or moving articles.

You could use the idea above, and to prevent the blocks from toppling over (assuming there is a rigibody attached to them), just check freeze rotation. This should prevent it from falling over.

I'm doing something very similar in my game right now. I found a great script that pushes any objects that has a rigidbody (although with some more scripting you could specify which objects it pushes by having it do a check for a tag you give your push objects, or something like that) Here's a link to the script, you can pretty much copy and paste it into your character controller script (though i'm not sure what your controller script looks like or how it's set up, but chances are it should work). Then give your push objects a rigidbody, and make sure you freeze rotation on the rigidbody if you don't want the object to topple over.

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.OnControllerColliderHit.html

PS I added a audio sound to make the object sound like it was sliding against the ground, and did this by attaching the audio clip to the push object and adding this script near the end of the push script

`if(!body.audio.isPlaying){ body.audio.Play();}`