setAngularFactor for Havok

Is there a havok version to freeze the rotation?

I was used to freeze the rotation like this

      mesh.physicsImpostor?.physicsBody.setAngularFactor(Vector3.Zero());

but seems like it didn’t work anymore with Havok :confused:

Amazing question for @Cedric or @Evgeni_Popov

1 Like

I think you can set inertia of mass properties to 0 for every rotation axis. So angularVelocity is multiplied by 0.

sphereAggregate.body.setMassProperties({
    inertia: new BABYLON.Vector3(0, 0, 0)
});

Example PG:

6 Likes

It worked! Thank you

1 Like

Yo @Takemura … What about SetLinearFactor… How do we handle that one ?