Jump to content

[SOLVED] rotation of rigid body


Recommended Posts

Posted

How the rotation of rigid restrictions, including limits on the rotation of the collision reaction

Posted

For example, a rigid body, by any direction of the force, rigid body is always around the Z axis. Or in a range of rotation

Posted

How the rotation of rigid restrictions, including limits on the rotation of the collision reaction

 

Use physical joints for rigid body movement restrictions (e.g. cylindrical joint for rotation restriction around an axis). See joints documentation.

 

...
   void setAngularLimitFrom(float angle)
   void setAngularLimitTo(float angle)
...
   void setLinearLimitFrom(float distance)
   void setLinearLimitTo(float distance)
...

  • 4 months later...
Posted

if you want restrict all angular(x, y, z), you use this function in Body Class.

 

void setMaxAngularVelocity(float velocity)

 

// script

BodyRigid body = class_remove(new BodyRigid(m_Mesh));

body.setMaxAngularVelocity(0);

 

this script not need any joint.

×
×
  • Create New...