Give Pursue a clearer description and add an optional display of the predicted position

Cheo

Active member
Hello, I was toying with the Pursue task this morning and initially had a hard time grasping its purpose and functioning. What really helped was creating a display object for the predicted position. This can be simply done by just creating a shared game object like this in Pursue :

C#:
public SharedGameObject m_Prediction;

And then just add this before returning the Target Vector 3 :

C#:
            if(m_Prediction != null)
            {
                m_Prediction.Value.transform.position = (targetPosition + (targetPosition - prevTargetPosition) * futurePrediction);
            }

Here's the result in video :


Alternatively, a gizmo could be drawn instead. Either way, I hope this addition and description clarification can be made for convenience's sake. Thanks in advance.
 
Top