Sprite::setDirection()
Sets the direction of the sprite to a given degrees. When this value is 0 the sprite moves up, when it is 180 it moves down.
Examples
Syntax
Java
.setDirection(degrees)
.setDirection(v)
Scratch
point in direction (degrees)
Parameters
| Name | Data Type | Description |
|---|---|---|
| degrees | double | between 0 and 360 |
| v | Vector2 | a vector |
Return
void