Polarith AI
1.8
Simple Controller (2D)

front-end: AIMSimpleController (AIMSimpleController2D)

This example controller is intended to visualize the direct output concerning the movement decisions made by the AI. Therefore, the resulting direction is directly applied to the position of the game object and the agent is rotated towards this direction for a better indication. The resulting magnitude may also be applied to scale the maximum velocity of the agent. Note that there is also a 2D version of this component.

Properties

This component has got the following specific properties.

Property Description
Up (3D only) The Up vector is the normal of the plane the agent moves in. It is necessary to define this plane so that the agent is able to rotate correctly. For instance, in a common 3D scene, the XZ-plane usually is the ground, which would require an Up vector of (0, 1, 0).
Speed The maximum speed the agent can have. If ObjectiveAsSpeed is negative, the agent moves constantly with this value.
ObjectiveAsSpeed If this index points to a valid objective, the velocity of the agent is scaled with the appropriate magnitude of the decision. This can be used if you want your agent to slow down depending on the resulting magnitudes.
Context An optional reference to a Context component. You can use this if you want to separate the AI components from the controller into different game objects.

Remarks

For debugging purposes, this component is acceptable, but for production, you should definitely implement your own character controller which matches your application or game best.

Imprint