Game Development Community

How can I do a simple Cube Demo?

by Andre Prior · in Torque Game Builder · 07/17/2006 (10:53 am) · 1 replies

Hello,

I cant find out how I can make a simple Physic demonstration with 10 cubes falling down on.
How can I make it?

Oh, and how can I rotate a sprite?


Thank you!!!!

#1
07/17/2006 (11:33 am)
One of the quickest ways to do it is through the level builder. Drag your box sprite on to the scene and click on edit. Click on the collision tab and have it send and recieve collision and physics. Set it's response mode to Rigid. Then click on the physics tab and set Constant force Y to be 50 or something. Change the value depending on how fast you want it. The box should be falling vertically. Copy and paste this box 9 times so that you have 10 boxes. Create another object as the ground so that the boxed collide with it instead of going past the screen.
As for rotation, you can either set it in the level builder via the Scene object tab, or you can script it via the setRotation command. Check the TGB reference for all the rotation commands (and every other command).