MovementKit
Loading...
Searching...
No Matches
Movement related items.
Collaboration diagram for Movement related items.:

Topics

 Animation relateted
 

Classes

struct  RiverExplorer.Player.PlayerControl.Facing
 
struct  RiverExplorer.Player.PlayerControl.Moving
 

Enumerations

enum  RiverExplorer.Player.PlayerControl.CompassDirection_e {
  RiverExplorer.Player.PlayerControl.CompassDirection_e.UnknownCompassDirection , RiverExplorer.Player.PlayerControl.CompassDirection_e.North , RiverExplorer.Player.PlayerControl.CompassDirection_e.NorthByNorthEast , RiverExplorer.Player.PlayerControl.CompassDirection_e.NorthEast ,
  RiverExplorer.Player.PlayerControl.CompassDirection_e.EastByNorthEast , RiverExplorer.Player.PlayerControl.CompassDirection_e.East , RiverExplorer.Player.PlayerControl.CompassDirection_e.EastBySouthEast , RiverExplorer.Player.PlayerControl.CompassDirection_e.SouthEast ,
  RiverExplorer.Player.PlayerControl.CompassDirection_e.SouthBySouthEast , RiverExplorer.Player.PlayerControl.CompassDirection_e.South , RiverExplorer.Player.PlayerControl.CompassDirection_e.SouthBySouthWest , RiverExplorer.Player.PlayerControl.CompassDirection_e.SouthWest ,
  RiverExplorer.Player.PlayerControl.CompassDirection_e.WestBySouthWest , RiverExplorer.Player.PlayerControl.CompassDirection_e.West , RiverExplorer.Player.PlayerControl.CompassDirection_e.WestByNorthWest , RiverExplorer.Player.PlayerControl.CompassDirection_e.NorthWest ,
  RiverExplorer.Player.PlayerControl.CompassDirection_e.NorthByNorthWest
}
 
enum  RiverExplorer.Player.PlayerControl.MovementType_e { RiverExplorer.Player.PlayerControl.MovementType_e.UseApplyForce , RiverExplorer.Player.PlayerControl.MovementType_e.UseTransformPosition }
 
enum  RiverExplorer.Player.PlayerControl.MovingDirection_e {
  RiverExplorer.Player.PlayerControl.MovingDirection_e.UnknownDirection , RiverExplorer.Player.PlayerControl.MovingDirection_e.NotMoving , RiverExplorer.Player.PlayerControl.MovingDirection_e.IndependentOfDirection , RiverExplorer.Player.PlayerControl.MovingDirection_e.Circle ,
  RiverExplorer.Player.PlayerControl.MovingDirection_e.Forward , RiverExplorer.Player.PlayerControl.MovingDirection_e.ForwardRight , RiverExplorer.Player.PlayerControl.MovingDirection_e.Right , RiverExplorer.Player.PlayerControl.MovingDirection_e.BackwardRight ,
  RiverExplorer.Player.PlayerControl.MovingDirection_e.Backward , RiverExplorer.Player.PlayerControl.MovingDirection_e.BackwardLeft , RiverExplorer.Player.PlayerControl.MovingDirection_e.Left , RiverExplorer.Player.PlayerControl.MovingDirection_e.ForwardLeft ,
  RiverExplorer.Player.PlayerControl.MovingDirection_e.Down , RiverExplorer.Player.PlayerControl.MovingDirection_e.Up , RiverExplorer.Player.PlayerControl.MovingDirection_e.UpStairs , RiverExplorer.Player.PlayerControl.MovingDirection_e.DownStairs
}
 

Functions

delegate void RiverExplorer.Player.PlayerControl.NoMovement (Facing PlayerFacing, float TotalNoMovementTime)
 
delegate void RiverExplorer.Player.PlayerControl.Walk (Facing PlayerFacing, Moving PlayerMoving)
 

Variables

Vector3 RiverExplorer.Player.PlayerControl._LastPosition
 
Vector2 RiverExplorer.Player.PlayerControl._Movement
 
float RiverExplorer.Player.PlayerControl._NoMovementNextReportTime
 
float RiverExplorer.Player.PlayerControl._NoMovementTime
 
bool RiverExplorer.Player.PlayerControl.EnableMoving = true
 
float RiverExplorer.Player.PlayerControl.GamepadMinDeadZone = 0.125f
 
float RiverExplorer.Player.PlayerControl.MovementSpeed = 1000
 
MovementType_e RiverExplorer.Player.PlayerControl.MovementType = MovementType_e.UseApplyForce
 
float RiverExplorer.Player.PlayerControl.NoMovementCallInterval = 1.0f
 
Facing RiverExplorer.Player.PlayerControl.PlayerIsFacing
 
Moving RiverExplorer.Player.PlayerControl.PlayerIsMoving
 
bool RiverExplorer.Player.PlayerControl.PlayerIsRunning = false
 
Vector3 RiverExplorer.Player.PlayerControl.PlayerLastPosition
 

Properties

float RiverExplorer.Player.PlayerControl.BackwardSpeed [get, private set]
 
float RiverExplorer.Player.PlayerControl.ForwardSpeed [get, private set]
 
float RiverExplorer.Player.PlayerControl.RightDirection [get, private set]
 

Detailed Description

Movement

Movement can be disabled by settings EnableMovement to false.

Enumeration Type Documentation

◆ CompassDirection_e

General Compass directions. Can be used to indicate the direction an object is facing or moving.

Enumerator
UnknownCompassDirection 
North 

North 337.5° (-22.5°) to 22.5°

NorthByNorthEast 

North by North East 0° to 45°

NorthEast 

North East 22.5° to 67.5°

EastByNorthEast 

East by North East 45° to 90°

East 

East 67.5° to 112.5°

EastBySouthEast 

East by South East 90° to 135°

SouthEast 

South East 112.5° to 157.5°

SouthBySouthEast 

South by South East 135° to 180°

South 

South 157.5° to 202.5°

SouthBySouthWest 

South by South West 180° to 225°

SouthWest 

South West 202.5° to 247.5°

WestBySouthWest 

West by South West 225° to 270°

West 

West 247.5° to 292.5°

WestByNorthWest 

West by North West 270° to 315°

NorthWest 

North West 292.5° to 337.5°

NorthByNorthWest 

North by North West 315° to 360° (0°)

◆ MovementType_e

All player movement is by ApplyForce or by moving the transform.

Note
Jump always uses AddForce().
Enumerator
UseApplyForce 

The player movement will be accomplished by calling AddForce(), and the player MUST HAVE a RigidBody. If the player does not have a Rigidbody, an error will be generated.

UseTransformPosition 

The player will be moved by altering the transform.position. And no RigidBody is needed with the object.

◆ MovingDirection_e

A general direction an object is moving.

Enumerator
UnknownDirection 

Unknown or not determinable at this time.

NotMoving 

Not moving. Object is in the same place, or within dead zone distance of the last position.

IndependentOfDirection 

Direction irrelevant. Used when there is no specific direction, or a generic animation.

Circle 

Move or act in a circle.

Forward 

Forward - The player velocity or is facing between: >= +337.5° (-22.5°) and < +22.5°.

ForwardRight 

Forward to the Right - The player velocity or is facing between: >= +22.5° and < +67.5°.

Right 

Right - The player velocity is or facing between: >= +67.5° and < +112.5°.

BackwardRight 

Backward Right - The player velocity is or facing between: >= +112.5° and < +157.5°.

Backward 

Backward - The player velocity or is facing between: >= +157.5° and < +202.5°.

BackwardLeft 

Backward Left - The player velocity or is facing between: >= +202.5 < +247.5°.

Left 

Left - The player velocity or is facing between: >= +247.5° and < +292.5°.

ForwardLeft 

Forward Left - The player velocity or is facing between: >= +292.5.0 and < +337.5°

Down 

Down - The player velocity or is facing down.

Up 

Up - The player velocity or is facing up.

UpStairs 

Moving Up Stairs.

DownStairs 

Moving Down Stairs.

Function Documentation

◆ NoMovement()

delegate void RiverExplorer.Player.PlayerControl.NoMovement ( Facing PlayerFacing,
float TotalNoMovementTime )

#include <G:/Unity/AssetStoreProjects/MovementKit/Assets/RiverExplorer/PlayerControl/Scripts/PlayerControl.cs>

Delegate The player has been stopped for at least NoMovementCallInterval seconds.

Parameters
PlayerFacingThe direction the player is facing.
TotalNoMovementTimeThe number of seconds the player has not moved itself.
Note
The player is not moving.

◆ Walk()

delegate void RiverExplorer.Player.PlayerControl.Walk ( Facing PlayerFacing,
Moving PlayerMoving )

#include <G:/Unity/AssetStoreProjects/MovementKit/Assets/RiverExplorer/PlayerControl/Scripts/PlayerControl.cs>

Run forward, facing forward.

This is activated when the player is running in Direction, while facing Facing direction.

Parameters
PlayerFacingThe direction the player is facing.
PlayerMovingThe direction the player is moving.

Variable Documentation

◆ _LastPosition

Vector3 RiverExplorer.Player.PlayerControl._LastPosition
private

The last position the player moved.

◆ _Movement

Vector2 RiverExplorer.Player.PlayerControl._Movement
private

The latest movement input value.

◆ _NoMovementNextReportTime

float RiverExplorer.Player.PlayerControl._NoMovementNextReportTime
private

The last time the player moved.

◆ _NoMovementTime

float RiverExplorer.Player.PlayerControl._NoMovementTime
private

How long the player has not moved.

◆ EnableMoving

bool RiverExplorer.Player.PlayerControl.EnableMoving = true

◆ GamepadMinDeadZone

float RiverExplorer.Player.PlayerControl.GamepadMinDeadZone = 0.125f

◆ MovementSpeed

float RiverExplorer.Player.PlayerControl.MovementSpeed = 1000

If the player has a Rigidbody, then this value will have more or less effect when the Rigidbody has less or more mass, or drag.

◆ MovementType

MovementType_e RiverExplorer.Player.PlayerControl.MovementType = MovementType_e.UseApplyForce
private

How movement will be accomplished. When set to UseApplyForce, the player must have a RigidBody.

◆ NoMovementCallInterval

float RiverExplorer.Player.PlayerControl.NoMovementCallInterval = 1.0f

◆ PlayerIsFacing

Facing RiverExplorer.Player.PlayerControl.PlayerIsFacing
private

◆ PlayerIsMoving

Moving RiverExplorer.Player.PlayerControl.PlayerIsMoving
private

◆ PlayerIsRunning

bool RiverExplorer.Player.PlayerControl.PlayerIsRunning = false

◆ PlayerLastPosition

Vector3 RiverExplorer.Player.PlayerControl.PlayerLastPosition
private

Players last position.

Properties

◆ BackwardSpeed

float RiverExplorer.Player.PlayerControl.BackwardSpeed
getprivate set

The speed multipliers for backward direction.

◆ ForwardSpeed

float RiverExplorer.Player.PlayerControl.ForwardSpeed
getprivate set

The speed multipliers for forward direction.

◆ RightDirection

float RiverExplorer.Player.PlayerControl.RightDirection
getprivate set

What part of the players velocity is to the right. Minus is to the left. Value calculated in FixedUpdate().