pandemonium_engine/modules/steering_ai/doc_classes/GSAIUtils.xml

59 lines
1.9 KiB
XML
Raw Normal View History

2023-01-14 13:38:58 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GSAIUtils" inherits="Object" version="3.11">
<brief_description>
Math and vector utility functions.
2023-01-14 13:38:58 +01:00
</brief_description>
<description>
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>
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>
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>
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>
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>
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>
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>