Simple Controller

Component > Dialogue System > Actor > Player > Simple Controller

Simple Controller is a basic third-person 3D controller that uses the legacy animation system. It allows the player to run around and optionally fire a gun.

Properties

Property Function
Idle Idle animation clip
Run Forward Run forward animation clip
Run Back (Optional) Run backward animation clip. If unassigned, the Run Forward clip will be played in reverse
Aim (Optional) Gun aiming animation clip to use for the upper body
Fire (Optional) Gun firing animation to use for the upper body
Upper Body Mixing Transform Bone that defines the start of the upper body skeleton
Run Speed Units per second to move
Mouse Sensitivity X Look left/right mouse sensitivity
Mouse Sensitivity Y Look up/down mouse sensitivity
Mouse Minimum Y Lowest angle down that the player can look
Mouse Maximum Y Highest angle up that the player can look
Fire Layer Mask Collision layer to use to detect gun hits
Fire Sound Audio clip to play when firing the gun
Weapon Damage Value to send to target when sending a "TakeDamage" message

Details

The player can use the horizontal and vertical axes (e.g., WASD, arrow keys, or gamepad) to move, and the mouse to look around. The Fire1 button fires the PC's gun. Animation and weapon handling are fairly rudimentary, since Simple Controller is primarily intended to be a stand-in for a more advanced control system. It's useful, however, to get a PC up and running quickly.

The PC must have a legacy Animation component that contains the animation clips referenced in the properties above.

When the PC shoots, a TakeDamage(weaponDamage) message is sent to the target. It's up to the target to handle the message. The example scenes use the Die On Take Damage component, which simply kills the target whenever it takes any damage.


<< Components