2023-01-14 13:38:58 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name= "GSAIUtils" inherits= "Object" version= "4.4" >
2023-01-14 13:38:58 +01:00
<brief_description >
2023-01-14 14:31:39 +01:00
Math and vector utility functions.
2023-01-14 13:38:58 +01:00
</brief_description>
<description >
2023-01-14 14:31:39 +01:00
Math and vector utility functions.
2023-01-14 13:38:58 +01:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "angle_to_vector2" >
<return type= "Vector2" />
<argument index= "0" name= "angle" type= "float" />
<description >
2023-01-14 14:31:39 +01:00
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.
2023-01-14 13:38:58 +01:00
</description>
</method>
<method name= "clampedv3" >
<return type= "Vector3" />
<argument index= "0" name= "vector" type= "Vector3" />
<argument index= "1" name= "limit" type= "float" />
<description >
2023-01-14 14:31:39 +01:00
Returns the vector with its length capped to limit.
2023-01-14 13:38:58 +01:00
</description>
</method>
<method name= "to_vector2" >
<return type= "Vector2" />
<argument index= "0" name= "vector" type= "Vector3" />
<description >
2023-01-14 14:31:39 +01:00
Returns a vector2 with vector's x and y components.
2023-01-14 13:38:58 +01:00
</description>
</method>
<method name= "to_vector3" >
<return type= "Vector3" />
<argument index= "0" name= "vector" type= "Vector2" />
<description >
2023-01-14 14:31:39 +01:00
Returns a vector3 with vector's x and y components and 0 in z.
2023-01-14 13:38:58 +01:00
</description>
</method>
<method name= "vector2_to_angle" >
<return type= "float" />
<argument index= "0" name= "vector" type= "Vector2" />
<description >
2023-01-14 14:31:39 +01:00
Returns an angle in radians between the positive X axis and the vector.
2023-01-14 13:38:58 +01:00
</description>
</method>
<method name= "vector3_to_angle" >
<return type= "float" />
<argument index= "0" name= "vector" type= "Vector3" />
<description >
2023-01-14 14:31:39 +01:00
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.
2023-01-14 13:38:58 +01:00
</description>
</method>
</methods>
<constants >
</constants>
</class>