ST_B_Turret : MF_AbstractPlatform
Describes the properties of a simple turret.
Inherited Variables
target, weaponMount, aimObjectActive, aimObject, emptyAimRange, fixedAimObjectRange, useIntercept, useRootVelocity, velocityRoot, shotSpeed, exitLoc, targetAimLocation, targetRange, lastTargetPosition, targetRigidbody, velocity, playerControl
Inherited Methods
AimCheck(), AimLocation()
Override TargetWithinLimits : bool ( targ : Transform )
Returns true if targ is within the turning limits of the turret.
Public Variables
rotationRate : float
elevationRate : float
The speed in deg/sec. of the turret rotation and elevation. This will affect the pitch of rotator and elevator sounds.
limitLeft : float (0 to -180)
limitRight : float (0 to 180)
limitUp : float (0 to 90)
limitDown : float (0 to -90)
Each of these allow you to place traversal limits on the rotator and elevator parts. Movement tracking left and down use negative numbers. Tracking to the right and up use positive numbers.
restAngle : Vector2
You may define an angle for the turret to point when it has no target.
x is the angle of elevation (-90 to 90)
y is the angle of rotation (-180 to 180)
0, 0 points straight ahead.
restDelay : float
Time without a target before turret will move to restAngle.
rotator : Transform
The object that rotates around the y axis.
elevator : Transform
The object that rotates around the x axis.
rotatorSound : AudioObject
elevatorSound : AudioObject
These control the audio to be used for each part’s movement sound. This sound will play at a varying pitch/rate based on the current rotation/elevation speed as compared to its respective maximum.
For best results, this sound should be a constant looping whir or hum. Steady looping rhythmic elements work well too, as their rate will also vary with the turning speed.
Public Class AudioObject
audioSource : AudioSource
The audio source used for audio.
pitchMax : float
The maximum pitch the audio can be played at. This is reached when turning at full speed.
pitchMin : float
The minimum pitch the audio can be played at. This is the pitch that is approached as the turning motion slows.
Describes the properties of a simple turret.
Inherited Variables
target, weaponMount, aimObjectActive, aimObject, emptyAimRange, fixedAimObjectRange, useIntercept, useRootVelocity, velocityRoot, shotSpeed, exitLoc, targetAimLocation, targetRange, lastTargetPosition, targetRigidbody, velocity, playerControl
Inherited Methods
AimCheck(), AimLocation()
Override TargetWithinLimits : bool ( targ : Transform )
Returns true if targ is within the turning limits of the turret.
Public Variables
rotationRate : float
elevationRate : float
The speed in deg/sec. of the turret rotation and elevation. This will affect the pitch of rotator and elevator sounds.
limitLeft : float (0 to -180)
limitRight : float (0 to 180)
limitUp : float (0 to 90)
limitDown : float (0 to -90)
Each of these allow you to place traversal limits on the rotator and elevator parts. Movement tracking left and down use negative numbers. Tracking to the right and up use positive numbers.
restAngle : Vector2
You may define an angle for the turret to point when it has no target.
x is the angle of elevation (-90 to 90)
y is the angle of rotation (-180 to 180)
0, 0 points straight ahead.
restDelay : float
Time without a target before turret will move to restAngle.
rotator : Transform
The object that rotates around the y axis.
elevator : Transform
The object that rotates around the x axis.
rotatorSound : AudioObject
elevatorSound : AudioObject
These control the audio to be used for each part’s movement sound. This sound will play at a varying pitch/rate based on the current rotation/elevation speed as compared to its respective maximum.
For best results, this sound should be a constant looping whir or hum. Steady looping rhythmic elements work well too, as their rate will also vary with the turning speed.
Public Class AudioObject
audioSource : AudioSource
The audio source used for audio.
pitchMax : float
The maximum pitch the audio can be played at. This is reached when turning at full speed.
pitchMin : float
The minimum pitch the audio can be played at. This is the pitch that is approached as the turning motion slows.