Polarith AI
1.8

◆ PerceptSteering()

virtual void PerceptSteering ( )
protectedvirtualinherited

This method gets called once for each processed percept.

Its purpose is to set an appropriate ResultDirection and ResultMagnitude for obtaining/writing objective values. So the implementation of this method determines what kind of AI movement behaviour a derived SteeringBehaviour class really is.

Within this method, the following references can be used for quick data access: self, percept, objective and sensor.

Usually, you might only want either PerceptSteering or ReceptorSteering to be called at once.

To make a SteeringBehaviour thread-safe, only self and percept must be accessed by writes. All other references for quick access are not thread-safe. Furthermore, to be thread-safe, no reference types of the Unity scripting API must be used within this method. If you fulfill these restrictions, you can mark the derived SteeringBehaviour class as thread-safe through setting AIMBehaviour.ThreadSafe to true for its corresponding front-end class.

Reimplemented in Formation, PlanarAvoidBounds, Pursue, PlanarAvoid, Seek, Evade, and Flee.

Imprint