Rigid body rotation

How to rotate a rigid body without applyTorque() or applyTorqueImpulse() ??

Use angularVelocity:
https://developer.playcanvas.com/en/api/pc.RigidBodyComponent.html#angularVelocity

tried that… does nothing :frowning: can you give an example…

Here you go:

31

https://playcanvas.com/project/582135/overview/tutorial-forces--impulses

1 Like

thank you… it worked… i was trying it like “this.entity.rigidbody.angularVelocity.y = value;”

another thing… how to rotate the rigidbody exactly 90 deg around the y axis ?

this helps?

this.entity.rotate(0.0, 90.0, 0.0);
this.entity.rigidbody.syncEntityToBody();
1 Like

Awesome… thanks man… :slight_smile: