Jump to content

JointHinge::getCurrentAngularVelocity


photo

Recommended Posts

JointHinge::getCurrentAngularVelocity() method always returns zero if one of the joined bodies is BodyDummy, regardless of real (visible) angular velocity

Link to comment

getCurrentAngularVelocity() is valid only if both bodies are of BodyRigid type. In all other cases 0 is returned. But as BodyDummy is always immovable, you can get the same result by the following code:

 

// BodyDummy is the second body
dot(getWorldAxis(),rigid_body.getAngularVelocity());

Invert angular velocity of the rigid body in case BodyDummy is the first of two bodies that the joint connects together.

Link to comment

It's not a problem for me, I've already changed the getCurrentAngularVelocity() code. But it's still a bug, and it looks like it should be fixed in Unigine. If there are rigid and dummy bodies, connected using JointHinge, and angular motor is on, THERE IS non-zero angular velocity, and joint should return it's value, don't it?

  • Like 1
Link to comment
  • 2 weeks later...
×
×
  • Create New...