Physics.P2.Body#angle

angle : number

The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90.
If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in degrees.

Source code: physics/p2/Body.js (Line 1626)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.