|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 directly called by classes inheriting from Actor. In non-Actor classes, it can be called as
- 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. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.|