Class MoleCharacter
Have a character controller push any dynamic rigidbody it hits
Namespace: nickmaltbie.OpenKCC.MoleKCCSample
Assembly: cs.temp.dll.dll
Syntax
public class MoleCharacter : NetworkSMAnim
Fields
avatarDiggingOffset
Have a character controller push any dynamic rigidbody it hits
Declaration
public Vector3 avatarDiggingOffset
Field Value
Type | Description |
---|---|
Vector3 |
jumpActionReference
Action reference for sprinting.
Declaration
public InputActionReference jumpActionReference
Field Value
Type | Description |
---|---|
InputActionReference |
jumpVelocity
Velocity of player jump.
Declaration
public float jumpVelocity
Field Value
Type | Description |
---|---|
Single |
moveActionReference
Have a character controller push any dynamic rigidbody it hits
Declaration
public InputActionReference moveActionReference
Field Value
Type | Description |
---|---|
InputActionReference |
movementEngine
Movement engine for controlling the kinematic character controller.
Declaration
protected MoleMovementEngine movementEngine
Field Value
Type | Description |
---|---|
MoleMovementEngine |
upFlipThreshold
Have a character controller push any dynamic rigidbody it hits
Declaration
public float upFlipThreshold
Field Value
Type | Description |
---|---|
Single |
walkingSpeed
Have a character controller push any dynamic rigidbody it hits
Declaration
public float walkingSpeed
Field Value
Type | Description |
---|---|
Single |
Properties
FallingTime
Time in which the player has been falling.
Declaration
public float FallingTime { get; }
Property Value
Type | Description |
---|---|
Single |
InputMovement
Input movement from player input updated each frame.
Declaration
public Vector3 InputMovement { get; }
Property Value
Type | Description |
---|---|
Vector3 |
MoveAction
Gets the move action associated with this kcc.
Declaration
public InputAction MoveAction { get; set; }
Property Value
Type | Description |
---|---|
InputAction |
relativeParentConfig
Relative parent configuration for following the ground.
Declaration
public RelativeParentConfig relativeParentConfig { get; protected set; }
Property Value
Type | Description |
---|---|
RelativeParentConfig |
Velocity
Player velocity in world space.
Declaration
public Vector3 Velocity { get; protected set; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
ApplyJump(Vector3)
Have a character controller push any dynamic rigidbody it hits
Declaration
public void ApplyJump(Vector3 velocity)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | velocity |
Awake()
Have a character controller push any dynamic rigidbody it hits
Declaration
public override void Awake()
FixedUpdate()
Have a character controller push any dynamic rigidbody it hits
Declaration
public override void FixedUpdate()
GetDesiredMovement()
The the player's desired velocity for their current input value.
Declaration
public Vector3 GetDesiredMovement()
Returns
Type | Description |
---|---|
Vector3 | Vector of player velocity based on input movement rotated by player view and projected onto the ground. |
LateUpdate()
Have a character controller push any dynamic rigidbody it hits
Declaration
public override void LateUpdate()
ReadPlayerMovement()
Read the current player input values.
Declaration
public void ReadPlayerMovement()
SetupInputs()
Setup inputs for the KCC
Declaration
public void SetupInputs()
Start()
Configure kcc state machine operations.
Declaration
public override void Start()
Update()
Have a character controller push any dynamic rigidbody it hits
Declaration
public override void Update()
UpdateGroundedState()
Update the grounded state of the kinematic character controller.
Declaration
public void UpdateGroundedState()