Jump to navigation Jump to search
|Note: This feature is for ZScript only.|
native clearscope static Vector2 RotateVector(Vector2 vec, double angle)
Rotates a 2D vector by the given angle. Used to get a vector to point in a new direction without modifying the magnitude of the vector. This function can only be called by classes inheriting from Actor.
- vec - The 2D vector to rotate
- angle - How many degrees to rotate the vector by. Negative values rotate it clockwise while positive values rotate it counterclockwise.
Returns the rotated Vector2.
|Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.|