Shooter Template  1.2.3
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Invector.vCharacterController.vThirdPersonMotor Class Reference
Inheritance diagram for Invector.vCharacterController.vThirdPersonMotor:
Invector.vCharacterController.vCharacter Invector.vHealthController Invector.vCharacterController.vICharacter Invector.vMonoBehaviour Invector.vIHealthController Invector.vIHealthController Invector.vIDamageReceiver Invector.vIDamageReceiver Invector.vCharacterController.vThirdPersonAnimator Invector.vCharacterController.vThirdPersonController Invector.vCharacterController.TopDownShooter.vTopDownController Invector.vCharacterController.v2_5D.v2_5DController

Classes

class  vMovementSpeed
 

Public Types

enum  LocomotionType { LocomotionType.FreeWithStrafe, LocomotionType.OnlyStrafe, LocomotionType.OnlyFree }
 
enum  GroundCheckMethod { GroundCheckMethod.Low, GroundCheckMethod.High }
 
- Public Types inherited from Invector.vCharacterController.vCharacter
enum  DeathBy { DeathBy.Animation, DeathBy.AnimationWithRagdoll, DeathBy.Ragdoll }
 

Public Member Functions

override void Init ()
 
virtual void UpdateMotor ()
 
override void TakeDamage (vDamage damage)
 Apply Damage to Current Health More...
 
virtual void ReduceStamina (float value, bool accumulative)
 
virtual void ChangeStamina (int value)
 Change the currentStamina of Character More...
 
virtual void ChangeMaxStamina (int value)
 Change the MaxStamina of Character More...
 
virtual void DeathBehaviour ()
 
void StaminaRecovery ()
 
virtual void ControlLocomotion ()
 
virtual void FreeMovement ()
 
virtual void ControlSpeed (float velocity)
 
virtual void SetJumpMultiplier (float jumpMultiplier, float timeToReset=1f)
 
virtual void ResetJumpMultiplier ()
 
virtual void AirControl ()
 
virtual float GroundAngle ()
 Return the ground angle More...
 
virtual float GroundAngleFromDirection ()
 Return the angle of ground based on movement direction More...
 
virtual void DisableGravityAndCollision ()
 Disables rigibody gravity, turn the capsule collider trigger and reset all input from the animator. More...
 
virtual void EnableGravityAndCollision (float normalizedTime)
 Turn rigidbody gravity on the uncheck the capsulle collider as Trigger when the animation has finish playing More...
 
virtual void RotateToTarget (Transform target)
 
virtual void RotateToDirection (Vector3 direction, bool ignoreLerp=false)
 
virtual void UpdateTargetDirection (Transform referenceTransform=null)
 Update the targetDirection variable using referenceTransform or just input.Rotate by word the referenceDirection More...
 
override void ResetRagdoll ()
 
override void EnableRagdoll ()
 
virtual string DebugInfo (string additionalText="")
 
- Public Member Functions inherited from Invector.vHealthController
virtual void ChangeHealth (int value)
 Change the currentHealth of Character More...
 
virtual void ChangeMaxHealth (int value)
 Change the MaxHealth of Character More...
 

Public Attributes

bool debugWindow
 
float maxStamina = 200f
 
float staminaRecovery = 1.2f
 
float sprintStamina = 30f
 
float jumpStamina = 30f
 
float rollStamina = 25f
 
UnityEvent OnStaminaEnd
 
LayerMask groundLayer = 1 << 0
 
LayerMask autoCrouchLayer = 1 << 0
 
float headDetect = 0.95f
 
LayerMask stopMoveLayer
 
float stopMoveHeight = 0.65f
 
float stopMoveDistance = 0.5f
 
bool useRootMotion = false
 
LocomotionType locomotionType = LocomotionType.FreeWithStrafe
 
vMovementSpeed freeSpeed
 
bool rotateByWorld = false
 
bool turnOnSpotAnim = false
 
bool rollControl = false
 
float randomIdleTime = 0f
 
bool jumpAirControl = true
 
float jumpTimer = 0.3f
 
float jumpForward = 3f
 
float jumpHeight = 4f
 
GroundCheckMethod groundCheckMethod = GroundCheckMethod.High
 
float stepOffsetEnd = 0.45f
 
float stepOffsetStart = 0f
 
float stepSmooth = 4f
 
float slopeLimit = 75f
 
float slideVelocity = 7
 
float extraGravity = -10f
 
float ragdollVel = -16f
 
RaycastHit groundHit
 
- Public Attributes inherited from Invector.vCharacterController.vCharacter
DeathBy deathBy = DeathBy.Animation
 
bool removeComponentsAfterDie
 
OnActionHandle onActionEnter = new OnActionHandle()
 
OnActionHandle onActionStay = new OnActionHandle()
 
OnActionHandle onActionExit = new OnActionHandle()
 
- Public Attributes inherited from Invector.vHealthController
int maxHealth = 100
 
float healthRecovery = 0f
 
float healthRecoveryDelay = 0f
 
float currentHealthRecoveryDelay
 

Protected Member Functions

void RemoveComponents ()
 
override void TriggerDamageReaction (vDamage damage)
 
virtual void StrafeMovement ()
 
virtual void StrafeLimitSpeed (float value)
 
virtual void StrafeVelocity (float velocity)
 
virtual void FreeVelocity (float velocity)
 
void StopMove ()
 
virtual void ControlJumpBehaviour ()
 
IEnumerator ResetJumpMultiplierRoutine ()
 
virtual void CheckGround ()
 
virtual void CheckGroundDistance ()
 
virtual void AlignWithSurface ()
 Prototype to align capsule collider with surface normal More...
 
virtual void Sliding ()
 
virtual bool StepOffset ()
 
virtual void ControlCapsuleHeight ()
 
virtual void CheckRagdoll ()
 
virtual void OnDrawGizmos ()
 
- Protected Member Functions inherited from Invector.vCharacterController.vCharacter
virtual void OnTriggerEnter (Collider other)
 
virtual void OnTriggerStay (Collider other)
 
virtual void OnTriggerExit (Collider other)
 
- Protected Member Functions inherited from Invector.vHealthController
virtual void Start ()
 
virtual IEnumerator RecoverHealth ()
 
virtual void HealthRecovery ()
 

Protected Attributes

bool recoveringStamina
 
float groundMinDistance = 0.25f
 
float groundMaxDistance = 0.5f
 
float groundDistance
 
float timeToResetJumpMultiplier
 
- Protected Attributes inherited from Invector.vCharacterController.vCharacter
OnActiveRagdoll _onActiveRagdoll = new OnActiveRagdoll()
 
vAnimatorParameter hitDirectionHash
 
vAnimatorParameter reactionIDHash
 
vAnimatorParameter triggerReactionHash
 
vAnimatorParameter triggerResetStateHash
 
vAnimatorParameter recoilIDHash
 
vAnimatorParameter triggerRecoilHash
 
bool isInit
 
- Protected Attributes inherited from Invector.vHealthController
bool _isDead
 
float _currentHealth
 
OnReceiveDamage _onReceiveDamage = new OnReceiveDamage()
 
OnDead _onDead = new OnDead()
 

Properties

bool isStrafing [get, set]
 
virtual bool jumpFwdCondition [get]
 
- Properties inherited from Invector.vCharacterController.vCharacter
Animator animator [get]
 
bool ragdolled [get, set]
 
OnActiveRagdoll onActiveRagdoll [get, protected set]
 
- Properties inherited from Invector.vHealthController
int MaxHealth [get, protected set]
 
float currentHealth [get, protected set]
 
bool isDead [get, set]
 
OnReceiveDamage onReceiveDamage [get, protected set]
 
OnDead onDead [get, protected set]
 
virtual bool canRecoverHealth [get]
 
- Properties inherited from Invector.vIHealthController
OnDead onDead [get]
 
float currentHealth [get]
 
int MaxHealth [get]
 
bool isDead [get, set]
 
- Properties inherited from Invector.vIDamageReceiver
OnReceiveDamage onReceiveDamage [get]
 
Transform transform [get]
 
GameObject gameObject [get]
 
- Properties inherited from Invector.vCharacterController.vICharacter
OnActiveRagdoll onActiveRagdoll [get]
 
Animator animator [get]
 
bool ragdolled [get, set]
 

Member Enumeration Documentation

◆ GroundCheckMethod

Enumerator
Low 
High 

◆ LocomotionType

Enumerator
FreeWithStrafe 
OnlyStrafe 
OnlyFree 

Member Function Documentation

◆ AirControl()

virtual void Invector.vCharacterController.vThirdPersonMotor.AirControl ( )
virtual

◆ AlignWithSurface()

virtual void Invector.vCharacterController.vThirdPersonMotor.AlignWithSurface ( )
protectedvirtual

Prototype to align capsule collider with surface normal

◆ ChangeMaxStamina()

virtual void Invector.vCharacterController.vThirdPersonMotor.ChangeMaxStamina ( int  value)
virtual

Change the MaxStamina of Character

Parameters
value

◆ ChangeStamina()

virtual void Invector.vCharacterController.vThirdPersonMotor.ChangeStamina ( int  value)
virtual

Change the currentStamina of Character

Parameters
value

◆ CheckGround()

virtual void Invector.vCharacterController.vThirdPersonMotor.CheckGround ( )
protectedvirtual

◆ CheckGroundDistance()

virtual void Invector.vCharacterController.vThirdPersonMotor.CheckGroundDistance ( )
protectedvirtual

◆ CheckRagdoll()

virtual void Invector.vCharacterController.vThirdPersonMotor.CheckRagdoll ( )
protectedvirtual

◆ ControlCapsuleHeight()

virtual void Invector.vCharacterController.vThirdPersonMotor.ControlCapsuleHeight ( )
protectedvirtual

◆ ControlJumpBehaviour()

virtual void Invector.vCharacterController.vThirdPersonMotor.ControlJumpBehaviour ( )
protectedvirtual

◆ ControlLocomotion()

virtual void Invector.vCharacterController.vThirdPersonMotor.ControlLocomotion ( )
virtual

◆ ControlSpeed()

virtual void Invector.vCharacterController.vThirdPersonMotor.ControlSpeed ( float  velocity)
virtual

◆ DeathBehaviour()

virtual void Invector.vCharacterController.vThirdPersonMotor.DeathBehaviour ( )
virtual

◆ DebugInfo()

virtual string Invector.vCharacterController.vThirdPersonMotor.DebugInfo ( string  additionalText = "")
virtual

◆ DisableGravityAndCollision()

virtual void Invector.vCharacterController.vThirdPersonMotor.DisableGravityAndCollision ( )
virtual

Disables rigibody gravity, turn the capsule collider trigger and reset all input from the animator.

◆ EnableGravityAndCollision()

virtual void Invector.vCharacterController.vThirdPersonMotor.EnableGravityAndCollision ( float  normalizedTime)
virtual

Turn rigidbody gravity on the uncheck the capsulle collider as Trigger when the animation has finish playing

Parameters
normalizedTimeCheck the value of your animation Exit Time and insert here

◆ EnableRagdoll()

override void Invector.vCharacterController.vThirdPersonMotor.EnableRagdoll ( )
virtual

◆ FreeMovement()

virtual void Invector.vCharacterController.vThirdPersonMotor.FreeMovement ( )
virtual

◆ FreeVelocity()

virtual void Invector.vCharacterController.vThirdPersonMotor.FreeVelocity ( float  velocity)
protectedvirtual

◆ GroundAngle()

virtual float Invector.vCharacterController.vThirdPersonMotor.GroundAngle ( )
virtual

Return the ground angle

Returns

◆ GroundAngleFromDirection()

virtual float Invector.vCharacterController.vThirdPersonMotor.GroundAngleFromDirection ( )
virtual

Return the angle of ground based on movement direction

Returns

◆ Init()

override void Invector.vCharacterController.vThirdPersonMotor.Init ( )
virtual

◆ OnDrawGizmos()

virtual void Invector.vCharacterController.vThirdPersonMotor.OnDrawGizmos ( )
protectedvirtual

◆ ReduceStamina()

virtual void Invector.vCharacterController.vThirdPersonMotor.ReduceStamina ( float  value,
bool  accumulative 
)
virtual

◆ RemoveComponents()

void Invector.vCharacterController.vThirdPersonMotor.RemoveComponents ( )
protected

◆ ResetJumpMultiplier()

virtual void Invector.vCharacterController.vThirdPersonMotor.ResetJumpMultiplier ( )
virtual

◆ ResetJumpMultiplierRoutine()

IEnumerator Invector.vCharacterController.vThirdPersonMotor.ResetJumpMultiplierRoutine ( )
protected

◆ ResetRagdoll()

override void Invector.vCharacterController.vThirdPersonMotor.ResetRagdoll ( )
virtual

◆ RotateToDirection()

virtual void Invector.vCharacterController.vThirdPersonMotor.RotateToDirection ( Vector3  direction,
bool  ignoreLerp = false 
)
virtual

◆ RotateToTarget()

virtual void Invector.vCharacterController.vThirdPersonMotor.RotateToTarget ( Transform  target)
virtual

◆ SetJumpMultiplier()

virtual void Invector.vCharacterController.vThirdPersonMotor.SetJumpMultiplier ( float  jumpMultiplier,
float  timeToReset = 1f 
)
virtual

◆ Sliding()

virtual void Invector.vCharacterController.vThirdPersonMotor.Sliding ( )
protectedvirtual

◆ StaminaRecovery()

void Invector.vCharacterController.vThirdPersonMotor.StaminaRecovery ( )

◆ StepOffset()

virtual bool Invector.vCharacterController.vThirdPersonMotor.StepOffset ( )
protectedvirtual

◆ StopMove()

void Invector.vCharacterController.vThirdPersonMotor.StopMove ( )
protected

◆ StrafeLimitSpeed()

virtual void Invector.vCharacterController.vThirdPersonMotor.StrafeLimitSpeed ( float  value)
protectedvirtual

◆ StrafeMovement()

virtual void Invector.vCharacterController.vThirdPersonMotor.StrafeMovement ( )
protectedvirtual

◆ StrafeVelocity()

virtual void Invector.vCharacterController.vThirdPersonMotor.StrafeVelocity ( float  velocity)
protectedvirtual

◆ TakeDamage()

override void Invector.vCharacterController.vThirdPersonMotor.TakeDamage ( vDamage  damage)
virtual

Apply Damage to Current Health

Parameters
damagedamage

Reimplemented from Invector.vCharacterController.vCharacter.

◆ TriggerDamageReaction()

override void Invector.vCharacterController.vThirdPersonMotor.TriggerDamageReaction ( vDamage  damage)
protectedvirtual

◆ UpdateMotor()

virtual void Invector.vCharacterController.vThirdPersonMotor.UpdateMotor ( )
virtual

◆ UpdateTargetDirection()

virtual void Invector.vCharacterController.vThirdPersonMotor.UpdateTargetDirection ( Transform  referenceTransform = null)
virtual

Update the targetDirection variable using referenceTransform or just input.Rotate by word the referenceDirection

Parameters
referenceTransform

Member Data Documentation

◆ autoCrouchLayer

LayerMask Invector.vCharacterController.vThirdPersonMotor.autoCrouchLayer = 1 << 0

◆ debugWindow

bool Invector.vCharacterController.vThirdPersonMotor.debugWindow

◆ extraGravity

float Invector.vCharacterController.vThirdPersonMotor.extraGravity = -10f

◆ freeSpeed

vMovementSpeed Invector.vCharacterController.vThirdPersonMotor.freeSpeed

◆ groundCheckMethod

GroundCheckMethod Invector.vCharacterController.vThirdPersonMotor.groundCheckMethod = GroundCheckMethod.High

◆ groundDistance

float Invector.vCharacterController.vThirdPersonMotor.groundDistance
protected

◆ groundHit

RaycastHit Invector.vCharacterController.vThirdPersonMotor.groundHit

◆ groundLayer

LayerMask Invector.vCharacterController.vThirdPersonMotor.groundLayer = 1 << 0

◆ groundMaxDistance

float Invector.vCharacterController.vThirdPersonMotor.groundMaxDistance = 0.5f
protected

◆ groundMinDistance

float Invector.vCharacterController.vThirdPersonMotor.groundMinDistance = 0.25f
protected

◆ headDetect

float Invector.vCharacterController.vThirdPersonMotor.headDetect = 0.95f

◆ jumpAirControl

bool Invector.vCharacterController.vThirdPersonMotor.jumpAirControl = true

◆ jumpForward

float Invector.vCharacterController.vThirdPersonMotor.jumpForward = 3f

◆ jumpHeight

float Invector.vCharacterController.vThirdPersonMotor.jumpHeight = 4f

◆ jumpStamina

float Invector.vCharacterController.vThirdPersonMotor.jumpStamina = 30f

◆ jumpTimer

float Invector.vCharacterController.vThirdPersonMotor.jumpTimer = 0.3f

◆ locomotionType

LocomotionType Invector.vCharacterController.vThirdPersonMotor.locomotionType = LocomotionType.FreeWithStrafe

◆ maxStamina

float Invector.vCharacterController.vThirdPersonMotor.maxStamina = 200f

◆ OnStaminaEnd

UnityEvent Invector.vCharacterController.vThirdPersonMotor.OnStaminaEnd

◆ ragdollVel

float Invector.vCharacterController.vThirdPersonMotor.ragdollVel = -16f

◆ randomIdleTime

float Invector.vCharacterController.vThirdPersonMotor.randomIdleTime = 0f

◆ recoveringStamina

bool Invector.vCharacterController.vThirdPersonMotor.recoveringStamina
protected

◆ rollControl

bool Invector.vCharacterController.vThirdPersonMotor.rollControl = false

◆ rollStamina

float Invector.vCharacterController.vThirdPersonMotor.rollStamina = 25f

◆ rotateByWorld

bool Invector.vCharacterController.vThirdPersonMotor.rotateByWorld = false

◆ slideVelocity

float Invector.vCharacterController.vThirdPersonMotor.slideVelocity = 7

◆ slopeLimit

float Invector.vCharacterController.vThirdPersonMotor.slopeLimit = 75f

◆ sprintStamina

float Invector.vCharacterController.vThirdPersonMotor.sprintStamina = 30f

◆ staminaRecovery

float Invector.vCharacterController.vThirdPersonMotor.staminaRecovery = 1.2f

◆ stepOffsetEnd

float Invector.vCharacterController.vThirdPersonMotor.stepOffsetEnd = 0.45f

◆ stepOffsetStart

float Invector.vCharacterController.vThirdPersonMotor.stepOffsetStart = 0f

◆ stepSmooth

float Invector.vCharacterController.vThirdPersonMotor.stepSmooth = 4f

◆ stopMoveDistance

float Invector.vCharacterController.vThirdPersonMotor.stopMoveDistance = 0.5f

◆ stopMoveHeight

float Invector.vCharacterController.vThirdPersonMotor.stopMoveHeight = 0.65f

◆ stopMoveLayer

LayerMask Invector.vCharacterController.vThirdPersonMotor.stopMoveLayer

◆ timeToResetJumpMultiplier

float Invector.vCharacterController.vThirdPersonMotor.timeToResetJumpMultiplier
protected

◆ turnOnSpotAnim

bool Invector.vCharacterController.vThirdPersonMotor.turnOnSpotAnim = false

◆ useRootMotion

bool Invector.vCharacterController.vThirdPersonMotor.useRootMotion = false

Property Documentation

◆ isStrafing

bool Invector.vCharacterController.vThirdPersonMotor.isStrafing
getset

◆ jumpFwdCondition

virtual bool Invector.vCharacterController.vThirdPersonMotor.jumpFwdCondition
getprotected

The documentation for this class was generated from the following file: