Physics Reference
From Blender2crystal
Blender2crystal supports assigning physic properties to objects for simulating through crystalspace Dynamics plugins or CEL mechanic pcproperties. CEL support will be explained elsewhere on this manual.
Dynamics support works by setting the dynsys property in the sector settings to some name (will be the name of the iDynamicsSystem in CS). Gravity can also be set in sector settings using gravity property.
All objects will be assigned colliders for the physical simulation and will be set up correctly. If an object is not wanted to take part in the physical simulation the dynamics property can be used. If an object is to be used as a static collider, the staticpos or static property must be used (otherwise gravity and collisions will affect the object). This is usually used for the world meshes.
The collider for each object can be set to any of mesh, box or sphere. In each case an appropiate collider will be generated and used. Mesh will use the mesh object for collision, box will use the bounding box (can be seen in blender by setting bounding box view), sphere will use a sphere around the object.
Note than with walktest dynamics plugin is not used by default so some tweaking of config files will be necessary for the map to run. Note also that walktest does not run the physics simulation so the objects will actually not move. An special program or CEL mode must be used for inmediate results.
[edit] Joints
Joints can be specified by setting the joint property in an object to the name of another object that also has a physics body.
The joint will be fixed in all displacement and rotation axis, and can then be freed by setting any of the fixedx,fixedy,fixedz,fixedxrot,fixedyrot,fixedzrot properties to false.
When freeing an axis it will by default be totally free, and can be further constrained using the jointmin,jointmax,jointminangle,jointmaxangle properties.
Note that not all possibilities of freedom are allowed for the different variables. Currently possibilities are:
- All fixed: A fixed joint. see here
- 1 rotation free axis: an ode hinge. see here
- 2 rotation free axis: an ode hinge2. see here
- 3 rotation free axis: an ode ball and socket joint. see here
- 1 displacement free axis: an ode slider. see here
- All other possibilities will result in NO JOINT, including more than one degree of freedom in displacement or mixing displacement and rotation constraints.
Using joints it is possible to create nice mechanisms like chains, cars or articulated robots.

