Show / Hide Table of Contents

Class PlayerMotor

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
PlayerMotor
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(PlayerSpeedChanger))]
[RequireComponent(typeof(CharacterController))]
public class PlayerMotor : MonoBehaviour

Fields

| Improve this Doc View Source

controller

Declaration
[HideInInspector]
[NonSerialized]
public CharacterController controller
Field Value
Type Description
CharacterController
| Improve this Doc View Source

limitDiagonalSpeed

Declaration
public bool limitDiagonalSpeed
Field Value
Type Description
Boolean
| Improve this Doc View Source

smoothFollower

Declaration
public Transform smoothFollower
Field Value
Type Description
Transform
| Improve this Doc View Source

smoothFollowerLerpSpeed

Declaration
public float smoothFollowerLerpSpeed
Field Value
Type Description
Single
| Improve this Doc View Source

systemTimerUpdatesDivisor

Declaration
public float systemTimerUpdatesDivisor
Field Value
Type Description
Single

Properties

| Improve this Doc View Source

CancelMovement

Cancels all movement impulses next frame. Used to scrub movement impulse when player dies, opens inventory, or loads game. Flag will be lowered again after movement cleared.

Declaration
public bool CancelMovement { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

CollisionFlags

Declaration
public CollisionFlags CollisionFlags { get; set; }
Property Value
Type Description
CollisionFlags
| Improve this Doc View Source

FreezeMotor

Freeze motor for an amount of time in seconds. Used by teleport action to prevent player from falling when teleport is part of a physics change. It can take a few frames for physics to catch up.

Declaration
public float FreezeMotor { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

GroundedTime

Declaration
public float GroundedTime { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

IsClimbing

Declaration
public bool IsClimbing { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsCrouching

Declaration
public bool IsCrouching { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsGrounded

Declaration
public bool IsGrounded { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsJumping

Declaration
public bool IsJumping { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsLevitating

Declaration
public bool IsLevitating { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsMovingLessThanHalfSpeed

Declaration
public bool IsMovingLessThanHalfSpeed { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsRiding

Declaration
public bool IsRiding { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsRunning

Declaration
public bool IsRunning { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsStandingStill

Declaration
public bool IsStandingStill { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsSwimming

Declaration
public bool IsSwimming { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

MoveDirection

Declaration
public Vector3 MoveDirection { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

OnExteriorPath

The method by which player is standing on outdoor path.

Declaration
public bool OnExteriorPath { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

OnExteriorStaticGeometry

The method by which player is standing on outdoor path.

Declaration
public bool OnExteriorStaticGeometry { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

OnExteriorWater

The method by which player is standing on exterior water.

Declaration
public PlayerMotor.OnExteriorWaterMethod OnExteriorWater { get; }
Property Value
Type Description
PlayerMotor.OnExteriorWaterMethod
| Improve this Doc View Source

Speed

Declaration
public float Speed { get; }
Property Value
Type Description
Single

Methods

| Improve this Doc View Source

DistanceToPlayer(Vector3)

Declaration
public float DistanceToPlayer(Vector3 position)
Parameters
Type Name Description
Vector3 position
Returns
Type Description
Single
| Improve this Doc View Source

FindGroundPosition(Single)

Attempts to find the ground position below player, even if player is jumping/falling

Declaration
public Vector3 FindGroundPosition(float distance = 10F)
Parameters
Type Name Description
Single distance

Distance to fire ray.

Returns
Type Description
Vector3

Hit point on surface below player, or player position if hit not found in distance.

| Improve this Doc View Source

FixStanding(Single, Single)

Declaration
public bool FixStanding(float extraHeight = 0F, float extraDistance = 0F)
Parameters
Type Name Description
Single extraHeight
Single extraDistance
Returns
Type Description
Boolean
| Improve this Doc View Source

StartRestGroundedCheck()

Declaration
public bool StartRestGroundedCheck()
Returns
Type Description
Boolean

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX