⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    MouseAndGamepadAimController MonoBehaviour

    Overview

    The MouseAndGamepadAimController behaviour handles mouse and gamepad input for moving the camera, including smoothing and acceleration.

    Inspector

    MouseAndGamepadAimController

    Properties

    Name Type Description
    Yaw Transform Transform The transform to yaw when aiming. This should be a parent of the pitch transform.
    Aim Yaw Transform Transform This optional transform detaches the character direction from the aim direction.
    Steering Rate Float The time taken to turn the character to the aim-yaw direction (if Aim Yaw Transform is set). 0 = call LerpYawToAim() manually, 1 = instant.
    Pitch Transform Transform The transform to pitch when aiming. This should be a child of the yaw transform.
    Max Pitch Float The maximum pitch from horizontal the aimer can rotate.
    Constraints Damping Float The amount of damping applied when rotating the camera to match constraints.
    Constraints Tolerance Float Once the angle outside constraints goes below this value, the camera will snap to the constraints. Larger values will have a visible effect.
    YawConstraintsFalloff Float An angle range from the yaw constraint limits where the input falls off. This gives the effect of softer constraint limits instead of hitting an invisible wall.
    Mouse Turn Angle Min Float Number of degrees for 1 unit of mouse movement if sensitivity is set to 0.
    Mouse Turn Angle Max Float Number of degrees for 1 unit of mouse movement if sensitivity is set to 1.
    Relative To Transform The transform to calculate the input relative to. If the character can tilt left or right then this transform is required to prevent tilt messing up the yaw calculations.
    Mouse Smoothing Buffer Size Float The number of frames to store and use for the mouse smoothing history.
    Mouse Smoothing Multiplier Min Float The weight multiplier for the previous frame when averaging if the smoothing is set to minimum.
    Mouse Smoothing Multiplier Max Float The weight multiplier for the previous frame when averaging if the smoothing is set to maximum.
    Mouse Accel Speed Multiply Min Float The base acceleration multiplier when acceleration is set to the minimum.
    Mouse Accel Speed Multiply Max Float The base acceleration multiplier when acceleration is set to the maximum.
    Mouse Acceleration Max Float The maximum multiplier acceleration can apply to the mouse input (0 means no maximum).
    Mouse Acceleration Type Dropdown Does mouse speed affect the input linearly or based on the square of the speed. Options are Linear, Quadratic.
    Analog Turn Angle Min Float Number of degrees per second for the gamepad analog at its limit, if sensitivity is set to 0.
    Analog Turn Angle Max Float Number of degrees per second for the gamepad analog at its limit, if sensitivity is set to 1.
    Analog Curve AnimationCurve The input curve for analog input. This can be used to define a deadzone, and damp smaller movements.

    See Also

    NeoFPS Input

    Unity Input

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX