Third Person Cover Shooter  1.6
CoverShooter.AIAim Class Reference

Manages head, body and arm direction for both civilians and fighters. More...

Inheritance diagram for CoverShooter.AIAim:
CoverShooter.AIBase

Public Member Functions

void OnWalkDirection (Vector3 value)
 Notified of a new walk direction. More...
 
void ToScan ()
 Told to start scanning the surrounding area. More...
 
void ToFaceWalkDirection ()
 Told to turn both body and arms towards the walk direction. More...
 
void ToTurnToWalkDirection ()
 Told to turn the body towards the walk direction. More...
 
void ToTurnAt (Vector3 position)
 Told by the brains to turn the body at a position. More...
 
void ToTurnTo (Vector3 direction)
 Told by the brains to turn the body to a direection. More...
 
void ToAimAt (Vector3 position)
 Told by the brains to aim the gun at a position. More...
 
void ToAimTo (Vector3 direction)
 Told by the brains to aim the gun to a direction. More...
 
void ToTarget (ActorTarget target)
 Told by the brains to aim at an actor. More...
 
void ToSlowlyTurnAt (Vector3 position)
 Told by the brains to slowly turn the body at a position. More...
 
void ToSlowlyTurnTo (Vector3 direction)
 Told by the brains to slowly turn the body to a direction. More...
 
void ToSlowlyAimAt (Vector3 position)
 Told by the brains to slowly aim the gun at a position. More...
 
void ToSlowlyAimTo (Vector3 direction)
 Told by the brains to slowly aim the gun to a direction. More...
 
void aimAt (Vector3 position)
 
void aimTo (Vector3 direction)
 
- Public Member Functions inherited from CoverShooter.AIBase
void Message (string name)
 Sends a message to other components. More...
 
void Message (string name, object value)
 Sends a message to other components. More...
 

Public Attributes

float Speed = 6
 Speed at which the AI turns. More...
 
float SlowSpeed = 2
 Speed at which the AI turns when in slow mode. More...
 
float MinScanDuration = 3.5f
 Duration of sweeping in a single direction. More...
 
float MaxScanDuration = 5
 Duration of sweeping in a single direction. More...
 
float MinScanDistance = 6
 Minimal unobstructed distance in a direction for it to be scanned. More...
 
float MinSweepDuration = 4
 Duration of a single sweep. More...
 
float MaxSweepDuration = 6
 Duration of a single sweep. More...
 
float SweepFOV = 30
 How wide is a single sweep in degrees. More...
 
float AccuracyError = 2
 Maximum degrees of error the AI can make when firing. More...
 
AITargetSettings Target = new AITargetSettings(0.5f, 0.8f)
 Position of the enemy the AI is aiming at. More...
 
bool DebugAim = false
 Should a debug rays be displayed. More...
 

Detailed Description

Manages head, body and arm direction for both civilians and fighters.

Member Function Documentation

◆ aimAt()

void CoverShooter.AIAim.aimAt ( Vector3  position)

◆ aimTo()

void CoverShooter.AIAim.aimTo ( Vector3  direction)

◆ OnWalkDirection()

void CoverShooter.AIAim.OnWalkDirection ( Vector3  value)

Notified of a new walk direction.

◆ ToAimAt()

void CoverShooter.AIAim.ToAimAt ( Vector3  position)

Told by the brains to aim the gun at a position.

◆ ToAimTo()

void CoverShooter.AIAim.ToAimTo ( Vector3  direction)

Told by the brains to aim the gun to a direction.

◆ ToFaceWalkDirection()

void CoverShooter.AIAim.ToFaceWalkDirection ( )

Told to turn both body and arms towards the walk direction.

◆ ToScan()

void CoverShooter.AIAim.ToScan ( )

Told to start scanning the surrounding area.

◆ ToSlowlyAimAt()

void CoverShooter.AIAim.ToSlowlyAimAt ( Vector3  position)

Told by the brains to slowly aim the gun at a position.

◆ ToSlowlyAimTo()

void CoverShooter.AIAim.ToSlowlyAimTo ( Vector3  direction)

Told by the brains to slowly aim the gun to a direction.

◆ ToSlowlyTurnAt()

void CoverShooter.AIAim.ToSlowlyTurnAt ( Vector3  position)

Told by the brains to slowly turn the body at a position.

◆ ToSlowlyTurnTo()

void CoverShooter.AIAim.ToSlowlyTurnTo ( Vector3  direction)

Told by the brains to slowly turn the body to a direction.

◆ ToTarget()

void CoverShooter.AIAim.ToTarget ( ActorTarget  target)

Told by the brains to aim at an actor.

◆ ToTurnAt()

void CoverShooter.AIAim.ToTurnAt ( Vector3  position)

Told by the brains to turn the body at a position.

◆ ToTurnTo()

void CoverShooter.AIAim.ToTurnTo ( Vector3  direction)

Told by the brains to turn the body to a direection.

◆ ToTurnToWalkDirection()

void CoverShooter.AIAim.ToTurnToWalkDirection ( )

Told to turn the body towards the walk direction.

Member Data Documentation

◆ AccuracyError

float CoverShooter.AIAim.AccuracyError = 2

Maximum degrees of error the AI can make when firing.

◆ DebugAim

bool CoverShooter.AIAim.DebugAim = false

Should a debug rays be displayed.

◆ MaxScanDuration

float CoverShooter.AIAim.MaxScanDuration = 5

Duration of sweeping in a single direction.

Afterwards a new direction is picked.

◆ MaxSweepDuration

float CoverShooter.AIAim.MaxSweepDuration = 6

Duration of a single sweep.

◆ MinScanDistance

float CoverShooter.AIAim.MinScanDistance = 6

Minimal unobstructed distance in a direction for it to be scanned.

◆ MinScanDuration

float CoverShooter.AIAim.MinScanDuration = 3.5f

Duration of sweeping in a single direction.

Afterwards a new direction is picked.

◆ MinSweepDuration

float CoverShooter.AIAim.MinSweepDuration = 4

Duration of a single sweep.

◆ SlowSpeed

float CoverShooter.AIAim.SlowSpeed = 2

Speed at which the AI turns when in slow mode.

◆ Speed

float CoverShooter.AIAim.Speed = 6

Speed at which the AI turns.

◆ SweepFOV

float CoverShooter.AIAim.SweepFOV = 30

How wide is a single sweep in degrees.

◆ Target

AITargetSettings CoverShooter.AIAim.Target = new AITargetSettings(0.5f, 0.8f)

Position of the enemy the AI is aiming at.


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