Polarith AI
1.8

◆ PresetVelocity

PresetVelocityType PresetVelocity = PresetVelocityType.None
inherited

If the value is anything other than PresetVelocityType.None, a game object's rotation and default forward direction is used to approximate its actual velocity.

This is especially useful for velocity-dependent behaviours like AIMAvoid and if no other sources for a valid velocity vector can be provided. Moreover, such preset forward direction has the advantage to be more stable in contrast to other possible velocity sources. The other types specify another default forward direction: PresetVelocityType.Automatic chooses the forward vector based on the editor mode (2D or 3D).

Other valid sources for obtaining a movement velocity are the AIMSteeringTag.TrackVelocity option or to make use of a Rigidbody respectively a Rigidbody2D.

Imprint