GSAIUtils
Description
Math and vector utility functions.
Functions
Vector3
func clampedv3(vector: Vector3, limit: float) -> Vector3
float
func vector3_to_angle(vector: Vector3) -> float
float
func vector2_to_angle(vector: Vector2) -> float
Vector2
func angle_to_vector2(angle: float) -> Vector2
Vector2
func to_vector2(vector: Vector3) -> Vector2
Vector3
func to_vector3(vector: Vector2) -> Vector3
Method Descriptions
clampedv3 (static)
Returns the vector
with its length capped to limit
.
vector3_to_angle (static)
Returns an angle in radians between the positive X axis and the vector
.
This assumes orientation for 3D agents that are upright and rotate around the Y axis.
vector2_to_angle (static)
Returns an angle in radians between the positive X axis and the vector
.
angle_to_vector2 (static)
Returns a directional vector from the given orientation angle.
This assumes orientation for 2D agents or 3D agents that are upright and rotate around the Y axis.
to_vector2 (static)
Returns a vector2 with vector
's x and y components.
to_vector3 (static)
Returns a vector3 with vector
's x and y components and 0 in z.
Last updated