DroneFlightControl

February 9, 2024 ยท View on GitHub

Namespace: Unity.TinyCharacterController.Control


Summary:

DroneFlightControl is a component that moves the character independently of the terrain. Movement of the character is controlled with MoveHorizontal or MoveVertical.

Features and Operation:

  • Movement Settings: Configures maximum speed, acceleration, braking power, and turning speed.
  • Directional Look Control: Determines whether to face the input direction or the direction of movement using LookForward.
  • Horizontal-Only Movement: Sets whether to ignore the pitch of the camera and move only horizontally with IsOnlyHorizontal.
  • Movement and Turn Priorities: Sets priorities for movement and turning.

Properties

NameDescription
SpeedMaximum speed.
AccelAmount of acceleration.
BrakeBraking power.
TurnSpeedSpeed of turning.
LookForwardSpecifies whether to look in the direction of movement or input.
IsOnlyHorizontalDetermines if movement is only horizontal.
MovePriorityPriority for movement.
TurnPriorityPriority for turning.

Methods

NameFunction
public void MoveHorizontal( Vector2 input )Moves in the horizontal direction. The direction is adjusted based on the camera's orientation.
public void MoveVertical( float input )Moves vertically, up for positive values and down for negative.