Matter-js: Adding an angular force to circles

Created on 29 Sep 2016  路  4Comments  路  Source: liabru/matter-js

Hey,

How can i add an angular force to a body like a circle?
I just found the Body.setAngularVelocity method. But this overrides the velocity. I just want to add an angular force.

Most helpful comment

@landgreen exactly, thanks for helping. A Body.applyTorque function might be a nice addition though.

All 4 comments

body.torque

A Number that specifies the torque (turning force) to apply in the current step. It is zeroed after every Body.update.

or I imagine Matter.Body.applyForce(body, position, force)

Applies a force to a body from a given world-space position, including resulting torque.

@landgreen Thanks! body.torque did the trick.

@landgreen exactly, thanks for helping. A Body.applyTorque function might be a nice addition though.

could you please add this method? Body.applyTorque @liabru thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

car1ot picture car1ot  路  3Comments

TimuJiang picture TimuJiang  路  4Comments

jack-guy picture jack-guy  路  3Comments

drachehavoc picture drachehavoc  路  4Comments

ShadewEnder picture ShadewEnder  路  3Comments