Physics Editor Manual

Please note that, since this documentation was written, the Physics Editor has been moved into the Entity Editor (Entities > Physics tab), with the rest of physics configuration done using the Object Editor when an Actor or Model is selected. However, the below video tutorial, though covering less detail, should be more up-to-date:

Video Tutorial: Building a Bridge to Drive Across (with Vehicle Physics)

Physics Editor & Physics/Collision Assets

Physics Editor could be used for configuring physics system and physics bodies, constraints (joints), vehicles and ragdolls, but now it is ready only for configuring physics system and physics bodies and one type of constraints.

Switch to Physics tab to use Physics Editor.

 

 
There are a few tabs:
  • World - for managing physics system and physical objects
  • Constraints (WIP) - for managing constraints (joints)
  • Vehicle (under construction) - for configuring vechiles
  • RagDoll(under construction) - for configuring ragdolls

World

There are two expandable panels: Physics System and Physics Body.

Physics System

Physics System panel is intended for manage scene’s Physics System (PS). By default Scene does not have any PS, so to create it click “Change Physics System” button:


“Create Physics System” dialog box will appear. Now only two options are presented here. Choose “Dynamic World” to create new PS (or choose “None” to remove an existing):

New PS will be created with default settings:


There are a few options:

  • Gravity – is a magnitude of gravitational acceleration level, 9.8 m\s2 by default is magnitude of Earth’s gravitational acceleration. It is negative as objects falls in direction of planet center, if you set this positive objects will fly up.
  • Enable Physics System – allow to enable\disable physics simulation.
  • Use Physical Terrain – allow to enable \disable collisions with terrain.
  • Enable Physics Debugger - allow to enable\disable rendering of physics debug info.

Physics Body

Object Type – is a type of physical object, now Rigid Body is enabled only, Collision Object is kind of object for what there is no collision response, only collision detection performs, it will be enabled in future release.

Collision Shape

Type – there are a few types of shapes:

  • Convex: Box, Sphere, Cone, Cylinder
  • Concave: Triangle Mesh

Size – size of OOBB of current collision shape. Size sets automatically to visual Actor OOBB taking into account its World Scale, when Collision Shape type changes. To get Actor OOBB size you could use Actor’s Size button.
Offset – Bullet implementation of physics system determines object position as position of its center of mass (COF), in some cases pivot of Scene Object (or Actor) lies in not the same place as COF as on the picture:

 
Pivot lies on the bottom of box here, but physical COF will be lying in the center.

So in such cases 2 solutions exist:

  • Apply offset using Transforms tab of Model Editor, a few disadvantages here: this offset will be applied to all Actors which uses a model, and it could be done in easy way only for simple collision shapes like box, sphere or cylinder.
  • Best solution to use collision shape Offset in Physics Editor.

Rigid Body

In this section Rigid Body’s parameters could be configured.
Dynamic Type – choose Static for immobile static objects, and Dynamic for moving.

This is tutorial with instructions for creating and configuring of physical object for an actor(avatar).
There is one requirement - physics system should be configured for your scene, see Physics System Tutorial for instructions.

Now I'd like propose to add a few objects to scene, as example like on picture:

Now time to configure physical objects. Switch to Physics Body panel.

Select bottom box, than choose Box from Collision Shape – Type drop down. New static rigid body will be created and connected with selected box. It will be “ground” box, so leave it static.

After this select other objects one by one (blue boxes, red cones and yellow balls), and choose necessary collision shape type for them. These objects should fall down on big white box, so we should configure them as dynamic, just choose Dynamics in Rigid Body – Dynamic Type:

So only 2 steps for creating physical object: choosing of shape type and dynamic type. Other settings we could leave without changes, detailed description of all parameters, you could see here Physics Body.

After this switch to Run tab and see results:


love