Torque3D Documentation / _generateds / TurretShapeData

TurretShapeData

consoledoc.h

Defines properties for a TurretShape object.

More...

Callbacks

void
onMountObject(SceneObject turret, SceneObject obj, int node)

Informs the TurretShapeData object that a player is mounting it.

void

Informs the TurretShapeData object that a player is unmounting it.

void

Informs the TurretData object that it is now sticking to another object.

Public Attributes

float

Vertical (Z axis) height of the camera above the turret.

float

Degrees per second rotation.

float

Maximum number of degrees to rotate from center.

float

Maximum number of degrees to rotate up from straight ahead.

float

Minimum number of degrees to rotate down from straight ahead.

float

Degrees per second rotation.

bool

Does the turret's mounted weapon(s) start in a loaded state.

Set how the mounted weapons are linked and triggered.

bool

Should the turret allow only z rotations.

Detailed Description

Defines properties for a TurretShape object.

Callbacks

onMountObject(SceneObject turret, SceneObject obj, int node)

Informs the TurretShapeData object that a player is mounting it.

Parameters:

turret

The TurretShape object.

obj

The player that is mounting.

node

The node the player is mounting to.

note:

Server side only.

onUnmountObject(SceneObject turret, SceneObject obj)

Informs the TurretShapeData object that a player is unmounting it.

Parameters:

turret

The TurretShape object.

obj

The player that is unmounting.

note:

Server side only.

onStickyCollision(TurretShape obj)

Informs the TurretData object that it is now sticking to another object.

This callback is only called if the TurretData::sticky property for this Turret is true. Parameters:

obj

The Turret object that is colliding.

note:

Server side only.

see:

TurretShape, TurretData

Public Attributes

float cameraOffset 

Vertical (Z axis) height of the camera above the turret.

float headingRate 

Degrees per second rotation.

A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.

float maxHeading 

Maximum number of degrees to rotate from center.

A value of 180 or more degrees indicates the turret may rotate completely around.

float maxPitch 

Maximum number of degrees to rotate up from straight ahead.

float minPitch 

Minimum number of degrees to rotate down from straight ahead.

float pitchRate 

Degrees per second rotation.

A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.

bool startLoaded 

Does the turret's mounted weapon(s) start in a loaded state.

True indicates that all mounted weapons start in a loaded state.

TurretShapeFireLinkType weaponLinkType 

Set how the mounted weapons are linked and triggered.

  • FireTogether: All weapons fire under trigger 0.

  • GroupedFire: Weapon mounts 0,2 fire under trigger 0, mounts 1,3 fire under trigger 1.

  • IndividualFire: Each weapon mount fires under its own trigger 0-3.

bool zRotOnly 

Should the turret allow only z rotations.

True indicates that the turret may only be rotated on its z axis, just like the Item class. This keeps the turret always upright regardless of the surface it lands on.