ST_Player
A simple script to allow a player to control turrets.
Public Variables
turretControl : bool
If true, this player can control turrets. Every turret with control set to Player_Mouse or Player_Click and with this script in the playerScript field will be controlled.
aimObject : GameObject
The object that a player controlled turret will aim at. Uses raycast to find a location the mouse is pointing at.
fireObject : GameObject
If ST_Turret control is Player_Click, this is the object placed when clicking. The turret will then fire at that object.
emptyAimRange : float
The distance to place aimObject if aiming at a spot with no collider.
fixedAimObjectRange : bool
aimObject always appears at emptyAimRange.
A simple script to allow a player to control turrets.
Public Variables
turretControl : bool
If true, this player can control turrets. Every turret with control set to Player_Mouse or Player_Click and with this script in the playerScript field will be controlled.
aimObject : GameObject
The object that a player controlled turret will aim at. Uses raycast to find a location the mouse is pointing at.
fireObject : GameObject
If ST_Turret control is Player_Click, this is the object placed when clicking. The turret will then fire at that object.
emptyAimRange : float
The distance to place aimObject if aiming at a spot with no collider.
fixedAimObjectRange : bool
aimObject always appears at emptyAimRange.