User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

en:tutorials:object_rotation_notes [2018/01/21 10:51 (2 years ago)]
sausage created
en:tutorials:object_rotation_notes [2018/02/14 08:46 (2 years ago)]
Line 1: Line 1:
-====== Notes on Rotation ====== 
-<WRAP center round box 60%> 
-Article by gemberkoekje,​ taken from the old reference section. 
-==== orxObject_SetRotation ==== 
-Rotation is set in radians. Zero rad vector is equivalent to (1, 0) vector in screen coordinates. In other words it is a horizontal line pointing from left to right. 
-Positive rotation is set in clockwise direction. If vector origin was in the center of the screen, then 1 rad would point to the bottom right corner of the screen. 
-==== orxObject_SetAngularVelocity ==== 
-Set angular velocity changes object rotation value over time. Setting positive value make object rotate clockwise. 
-By default object starts with zero rotation angle which points horizontally from left to right. As object rotates a full circle its rotation angle value will not reset to zero. Instead it will continue to grow in positive or negative direction according to angular velocity value. 
-Thus after one full circle the object rotation value will satisfy the condition: 
-<code c> 
-orxMath_Abs(orxObject_GetRotation(obj)) >= orxMATH_KF_2_PI 
-==== orxObject_GetWorldRotation and orxObject_GetRotation ==== 
-Returns current object rotation value in radians. The value returned can be any floating value. 
-See ''​orxObject_SetRotation''​ for coordinate system reference.  ​ 
-See ''​orxObject_SetAngularVelocity''​ for discussion of continuous rotation. 
en/tutorials/object_rotation_notes.txt ยท Last modified: 2018/02/14 08:46 (2 years ago) (external edit)