class MAGES::Interaction::SmoothMovementProvider

Overview

A locomotion provider that moves the Rig smoothly. More…

class SmoothMovementProvider: public MAGES::Interaction::BaseLocomotionProvider
{
public:
    // properties

    CharacterController RigCharacterController;
    float Speed;
    MovementMode MovementMode;
    bool EnableVerticalMovement;
};

Inherited Members

public:
    // properties

    ILocomotionSystem LocomotionSystem;
    LocomotionPhase LocomotionPhase;
    UnityEvent<LocomotionStartEventArgs> LocomotionStarted;
    UnityEvent<LocomotionEndEventArgs> LocomotionEnded;
    ILocomotionSystem LocomotionSystem;
    LocomotionPhase LocomotionPhase;
    UnityEvent<LocomotionStartEventArgs> LocomotionStarted;
    UnityEvent<LocomotionEndEventArgs> LocomotionEnded;

    // methods

    bool CanStartLocomotion();
    bool StartLocomotion(float time);
    bool EndLocomotion();
    bool CanStartLocomotion();
    bool StartLocomotion(float time = 10f);
    bool EndLocomotion();

Detailed Documentation

A locomotion provider that moves the Rig smoothly.

This can be used to create a functional moving Rig. It can also be combined with a turn provider to allow rotation adjustements.

See also:

SmoothTurnProvider, SnapTurnProvider

Properties

CharacterController RigCharacterController

Gets or sets the Rig’s Character Controller. If left empty the provider will try to find it on Awake. If the Character Controller is not found the provider will use direct transform manipulation for movement, therefore no collisions will happen.

float Speed

Gets or sets the speed of the movement.

MovementMode MovementMode

Gets or sets a value indicating whether the Rig can fly.

If set to true the Rig will move in the direction of the camera’s forward vector. This means that if the camera points away from the ground the rig will move up.

bool EnableVerticalMovement

Gets or sets a value indicating whether the user can move the Rig vertically.