Next: , Previous: , Up: AI   [Contents][Index]


2.6 Targeting Computer

Component: TargetingComputer

This component points it’s positive Z direction at the target, automatically taking into account lead distance. If set up correctly, this can create extremely accurate AI shooters. To make them less difficult, give them a slightly incorrect Shot Speed. Shot Speed assumes that the projectile experiences no drag, and travels in a straight line.

Field of TargetingComputer: bool constrainX

Should we constrain X to 0 during the turn operation? If true, this object won’t look up or down.

Default value: false

Field of TargetingComputer: bool debug

WARNING! SLOW OPERATION Should we output useful information to the console?

Default value: false

Available Messages

Message on TargetingComputer: ClearTarget ()

Causes the Targeting Computer to lose it’s current target, allowing it to target something else

Message on TargetingComputer: ToggleAutoLook ()

Turns turret auto-rotation on/off which causes the turret to search for targets

Message on TargetingComputer: ToggleAutoLook (bool)

Turns turret auto-rotation on/off which causes the turret to search for targets

Argument: Should the turret auto-look?

Field of TargetingComputer: bool constrainX

Should we constrain X to 0 during the turn operation? If true, this object won’t look up or down.

Default value: false

Field of TargetingComputer: bool debug

WARNING! SLOW OPERATION Should we output useful information to the console?

Default value: false

Available Messages

Message on TargetingComputer: ClearTarget ()

Causes the Targeting Computer to lose it’s current target, allowing it to target something else

Message on TargetingComputer: ToggleAutoLook ()

Turns turret auto-rotation on/off which causes the turret to search for targets

Message on TargetingComputer: ToggleAutoLook (bool)

Turns turret auto-rotation on/off which causes the turret to search for targets

Argument: Should the turret auto-look?


Next: , Previous: , Up: AI   [Contents][Index]