TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D Class Reference

This AI Action will let an agent with a CharacterRotation2D ability (set to ForcedRotation:true) rotate to face its target. More...

Inheritance diagram for MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D:
MoreMountains.Tools.AIAction

Public Member Functions

override void Initialization ()
 On init we grab our CharacterOrientation3D ability.
override void PerformAction ()
 On PerformAction we move.
Public Member Functions inherited from MoreMountains.Tools.AIAction
void PerformAction ()
virtual void OnEnterState ()
 Describes what happens when the brain enters the state this action is in. Meant to be overridden.
virtual void OnExitState ()
 Describes what happens when the brain exits the state this action is in. Meant to be overridden.

Public Attributes

bool LockRotationX = false
 whether or not to lock the X rotation. If set to false, the model will rotate on the x axis, to aim up or down
Public Attributes inherited from MoreMountains.Tools.AIAction
InitializationModes InitializationMode
 whether initialization should happen only once, or every time the brain is reset
string Label
 a label you can set to organize your AI Actions, not used by anything else

Protected Member Functions

virtual void Rotate ()
 Makes the orientation 3D ability rotate towards the brain target.
Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain.

Protected Attributes

CharacterRotation2D _characterRotation2D
Vector3 _targetPosition
Protected Attributes inherited from MoreMountains.Tools.AIAction
bool _initialized
AIBrain _brain

Additional Inherited Members

Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { EveryTime , OnlyOnce }
Properties inherited from MoreMountains.Tools.AIAction
virtual bool ActionInProgress [get, set]
virtual bool ShouldInitialize [get]

Detailed Description

This AI Action will let an agent with a CharacterRotation2D ability (set to ForcedRotation:true) rotate to face its target.

Member Function Documentation

◆ Initialization()

override void MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D.Initialization ( )
virtual

On init we grab our CharacterOrientation3D ability.

Reimplemented from MoreMountains.Tools.AIAction.

◆ PerformAction()

override void MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D.PerformAction ( )

On PerformAction we move.

◆ Rotate()

virtual void MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D.Rotate ( )
protectedvirtual

Makes the orientation 3D ability rotate towards the brain target.

Member Data Documentation

◆ _characterRotation2D

CharacterRotation2D MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D._characterRotation2D
protected

◆ _targetPosition

Vector3 MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D._targetPosition
protected

◆ LockRotationX

bool MoreMountains.TopDownEngine.AIActionRotateTowardsTarget2D.LockRotationX = false

whether or not to lock the X rotation. If set to false, the model will rotate on the x axis, to aim up or down


The documentation for this class was generated from the following file: