How to rotate an entity
A game character can be rotated To a fixed orientation, or it can be rotated By a certain angle amount.
For example, imagine an entity's initial orientation is 25 degrees about the y-axis.
The entity can rotate To an orientation of 60 degrees about the y-axis, as shown below:
Or it can change its orientation By 60 degree about the y-axis. Doing so will rotate the entity 85 degrees about the y-axis, as shown below:
Rotate To an Orientation
To rotate an entity to an orientation of 45 degrees about the y-axis, you use the method U4DEngine::U4DEntity::rotateTo(), as shown below:
Rotate By an Amount
To rotate an entiy by an amount of 1.0 degrees about the y-axis, you use the method U4DEngine::U4DEntity::rotateBy(), as shown below:
Last updated