Table of Contents

Class ThirdPersonSettings

ScriptableObject containing all third-person controller settings. Create an instance via Create > WitShells > ThirdPersonControl > Settings.

public class ThirdPersonSettings : ScriptableObject
Inheritance
ThirdPersonSettings

Properties

CrouchSpeed

public float CrouchSpeed { get; }

Property Value

float

Default

Returns a default settings instance. Attempts to load from Resources first.

public static ThirdPersonSettings Default { get; }

Property Value

ThirdPersonSettings

GroundCheckDistance

public float GroundCheckDistance { get; }

Property Value

float

GroundLayers

public LayerMask GroundLayers { get; }

Property Value

LayerMask

GroundedGravity

public float GroundedGravity { get; }

Property Value

float

JumpForce

public float JumpForce { get; }

Property Value

float

JumpTimeout

public float JumpTimeout { get; }

Property Value

float

LookSensitivity

public float LookSensitivity { get; }

Property Value

float

LookSpeed

public float LookSpeed { get; }

Property Value

float

MaxPitch

public float MaxPitch { get; }

Property Value

float

MinPitch

public float MinPitch { get; }

Property Value

float

RotationSmoothness

public float RotationSmoothness { get; }

Property Value

float

RunSpeed

public float RunSpeed { get; }

Property Value

float

SoundEffects

public SoundSfxObject SoundEffects { get; }

Property Value

SoundSfxObject

SoundVolume

public float SoundVolume { get; }

Property Value

float

TerminalVelocity

public float TerminalVelocity { get; }

Property Value

float

WalkSpeed

public float WalkSpeed { get; }

Property Value

float

Methods

CalculateJumpVelocity()

Calculates the initial jump velocity based on jump force and gravity.

public float CalculateJumpVelocity()

Returns

float

ClampPitch(float)

Clamps the pitch angle within the defined limits.

public float ClampPitch(float pitch)

Parameters

pitch float

Returns

float

GetMovementSpeed(bool, bool)

Gets the appropriate movement speed based on current state.

public float GetMovementSpeed(bool isSprinting, bool isCrouching)

Parameters

isSprinting bool
isCrouching bool

Returns

float