Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | RigidActors  


Rigid Actors

Author:Mostafa Mohamed

Introduction

The RigidActor physics editor is a tool that will enable you linking ModelFrames/Bones with rigid bodies and link these rigid bodies to joints to create an unlimited number of physics objects like cloth simulation, ragdolls, vechiles, breakable glass etc...

How to setup a simple RigidActor?

Stop your physics simulation

First thing before using the physics editors stop the simulation by clicking "Novodex Simulation Started" button on the toolbar, stopping the simulation resets the simulation to the initial transformation of actors that they will start with it in game.

Insert a RigidActor

Insert a new RigidActor script from the actors combo box.

Load a model

From the RigidActor properties change the "ModelFilename" property to "alien_T.x" you will find this model in the Models\Alien folder, after changing the property you will notice that the alien model is loaded and a grey boxes appear on each ModelFrame of the model.

Select the "Bip01_L_Forearm" frame

When moving a mouse over a frame a tooltip with the frame name will appear, when you are over the "Bip01_L_Forearm" click on it to select it (note: You can select a frame using the Frames treeview found on the frames tabpage).

Add a box to the selected frame

From the RigidActor toolbar click on the box button to add a box to the selected frame, then scale, rotate and translate it to fit the geometry attached to the frame.

Repeat the last two steps for the "Bip01_L_Hand" frame

Add a fixed Joint

From the joints menu on the RigidActor toolbar add a fixed joint (note: The joints menu on the RigidActor toolbar is different from the one on the main menu).

Select the first Actor

Click on the "Actor1" button on the joints toolbar and then select the "Bip01_L_Forearm" frame (click on the frame box not the attached rigid body).

Select the second actor

Click on the "Actor2" button on the joints toolbar and then select the "Bip01_L_Hand" frame. (note: you can select joints and view its linking through the Joints listview found on the joints tabpage on the right)

Position the joint

Click on the position joint button on the toolbar while selecting the fixed joint we added, this will position the joint in the center between its 2 actors

Start the physics simulation

Import the box mesh and add it under the alien as ground then start the physics simulation to see the physics in action.

Notes

  1. You can use a Skinned Model (XML created as described in SkinnedCharacters) with the RigidActor system. Just Insert a 'RigidActorAnimated' into your scene and then Load the skinned model via the 'ModelXMLFileName' Property. You can then bind Rigid Bodies to its ModelFrames (bones) like any other Model, and they will visually distort the mesh according to the skinning.
  2. It is better to use the RigidActor for all sort of things that can be done using a more than one multishape actor and joints, because the RigidActor performance is better, If you have more than one prefab and want to use them as a RigidActor use the new "Combine Selected ModelFrames" modifier to combine them in one actor as model frames and use them with the RigidActor.
  3. You can change the joints properties from the property grid control as normal.
  4. You can change the mass of each rigid body from the property grid control while selecting the rigid body.
  5. You can change between physics mode and animation mode on animated models from code using the StartPhysicsControl/StopPhysicsControl functions
respectively.

Any questions contact me at mostafa@artificialstudios.com.

Attachment sort Action Size Date Who Comment
StartStop.jpg manage 0.9 K 25 Apr 2005 - 13:48 Main.guest  
FixedJoint.JPG manage 44.9 K 25 Apr 2005 - 14:47 Main.guest  
ForeArm.JPG manage 34.5 K 25 Apr 2005 - 14:49 Main.guest  
LeftHand.JPG manage 40.7 K 25 Apr 2005 - 14:50 Main.guest  
RigidActor.JPG manage 83.2 K 25 Apr 2005 - 14:50 Main.guest  
RigidActorToolbar.JPG manage 4.0 K 25 Apr 2005 - 14:51 Main.guest  

RigidActors   Edit | Attach | Ref-By | Printable | Diffs | r1.5 | > | r1.4 | > | r1.3 | More