Add GetSplineDirection util to Spline

This commit is contained in:
Wojtek Figat
2021-01-26 12:32:35 +01:00
parent 937248794a
commit aa2eeb8243
2 changed files with 29 additions and 0 deletions

View File

@@ -96,6 +96,20 @@ public:
/// <returns>The calculated curve point transformation (local-space).</returns>
API_FUNCTION() Transform GetSplineLocalTransform(float time) const;
/// <summary>
/// Evaluates the spline curve direction (forward vector, aka position 1st derivative) at the given time in 3D (world-space).
/// </summary>
/// <param name="time">The time value. Can be negative or larger than curve length (curve will loop or clamp).</param>
/// <returns>The calculated curve direction (world-space).</returns>
API_FUNCTION() Vector3 GetSplineDirection(float time) const;
/// <summary>
/// Evaluates the spline curve direction (forward vector, aka position 1st derivative) at the given time in 3D (local-space).
/// </summary>
/// <param name="time">The time value. Can be negative or larger than curve length (curve will loop or clamp).</param>
/// <returns>The calculated curve direction (local-space).</returns>
API_FUNCTION() Vector3 GetSplineLocalDirection(float time) const;
/// <summary>
/// Evaluates the spline curve at the given index (world-space).
/// </summary>