PhysX Add Rigid Bodies
From C4 Engine Wiki
I am assuming that you are already familiar with navigating your way around the World Editor, if not, visit Creating a Basic World and look through how to use the editor.
Add an Object
Open the World Editor, for ease of use, I have added an empty world that is set up ready to use, it is called PhysX-Base.
- Open PhysX-Base
- Add a primitive object to the world. (e.g.a box or a sphere)
- Once the primitive is added, it is added as a static object, that is, it has no physics properties apart from it will interact will all of the other physics bodies by remaining stationary and providing a collision mesh (see Turns Debug on).
- Select the primitive object
- Press Ctrl-I and open up the node info dialog.
- Click on the Controllers Tab and select Physics Rigid Body from the left. Do not check the kinematic checkbox.
- At this point you have the option of adding the RigidBody properties from the Properties Tab, or leaving them off. Leaving the properties will use the default properties for rigid Bodies. In this example we will add the properties. Click on the properties Tab, select the Physics Rigid Body from the Available Properties and click Assign, leave the values as the default ones.
- Click Ok
- Save the world with a new name so that you leave the base world intact
- Get back to the main menu and Start New Game with the new world.
You can now shoot the primitive object and it interacts with its environment.
Experiment adding more and more objects, varying their properties so that you get a feel for the World Editor. Add a few static objects as well.
Debug Properties
Press the tilde key to open up the command window and enter one of the following commands.
pdebug 0 Turns debug off pdebug 1 Turns debug on pdebug 2 Freezes the physics pdebug 3 Unfreezes the physics


