Physics

From UWSim
Jump to: navigation, search

The physics block inside object describes the way this object will interact with the world setting basic physical properties.

XML syntax

Every tag in this block is optional, so default values may be used in case of not filling them.

  • mass: Object mass.
  • inertia: Object inertia (xyz). If it is not set bullet will try to guess it.
  • collisionShapeType: Choose how bullet will wrap the object. Available shapes: box, sphere, compound box, compound cylinder, trimesh, compound trimesh.*
  • collisionShape: Add a different 3D object file to create the object that will actually colliding. Highly recommended for complex objects.
  • linearDamping: Sets the friction/resistance for a moving object.
  • angularDamping: Sets the friction/resistance for a spinning object.
  • isKinematic: Sets kinematic flag ON/OFF. The object will not move. but other objects may react colliding with it.
  • minLinearLimit: Allows to set a minimum limit for the object movement (xyz). For instance it is possible to set a limit for the movement of a button while being pressed.
  • maxLinearLimit: Allows to set a maximum limit for the object movement (xyz).
  • minAngularLimit: Allows to set a minimum limit for the object rotation (xyz). For instance it is possible to set a limit for the rotation of a valve.
  • maxAngularLimit: Allows to set a maximum limit for the object rotation (xyz).

* Take into account trimesh objects will not collide between them as it is computationally intensive. Furthermore choosing simple collision shape types highly improves performance. Compound shapes will cover each different part of the 3D object in a collision shape type.