Polarith AI
1.8
AIMPhysicsController Class Reference

Description

A very simple and basic physics-based controller component suitable for the use in 3D projects where the agent has a clear orientation to a ground plane.

The purpose of this controller is to show the AI results under the assumption that there is physics involved for the movement so that the resulting AI outputs are smoothed over time through using forces. It rotates the forward vector of the agent towards the direction decided by the AI and translates along. Requires an AIMContext and Rigidbody component. If Context or Body are null, this controller attempts to get these components in the OnEnable method. If they are still null, the controller will stay disabled.

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.

Only one single component can be attached to one GameObject at a time.

Inheritance diagram for AIMPhysicsController:

Public Fields

float Torque = 1f
 Determines the base value of the applied force for rotating the character towards the decided direction. More...
 
float Speed = 15.0f
 Determines the base value specifying how fast the character moves. More...
 
int ObjectiveAsSpeed = -1
 If set equal to or greater than 0, the evaluated AI decision value is multiplied to the Speed. More...
 
ForceMode Mode = ForceMode.Acceleration
 The ForceMode which is applied to the Rigidbody.AddForce(Vector3, ForceMode) method of the associated Body. More...
 
AIMContext Context
 The AIMContext which provides the next movement direction that is applied to the Body. More...
 
Rigidbody Body
 The Rigidbody which gets manipulated by this controller. More...
 
Imprint