Sprite::pointInDirection()
Points the sprite in the specified direction.
Examples
Syntax
Java
.pointInDirection(degrees)
.pointInDirection(v)
Parameters
| Name | Data Type | Description |
|---|---|---|
| degrees | double | The direction in degrees to point the sprite. 0 degrees is up, 90 degrees is to the right, 180 degrees is down, and 270 degrees is to the left. |
| v | Vector2 | the target vector to point towards |
Return
void