Third Person Cover Shooter
1.6
|
Characters must have a Character Motor component attached. More...
Public Member Functions | |
GameObject | AskForTarget () |
An object the motor is currently aiming at. More... | |
bool | IsPerformingMeleeId (int id) |
Cover | GetClimbambleInDirection (float angle) |
Returns a potential climbable cover in given direction represented by a horizontal angle in world space. More... | |
Cover | GetClimbableInDirection (Vector3 direction) |
Returns a potential climbable cover in given direction. More... | |
void | SetBodyTarget (Vector3 target, float speed=8f) |
Sets the position for the character body to turn to. More... | |
void | SetAimTarget (Vector3 target) |
Sets the position for the character to look and aim at. More... | |
void | Resurrect () |
Catch the animation event at the end of the resurrection. More... | |
void | OnCustomAction (string name) |
Catch custom input coming from the controller. More... | |
void | OnFinishCustomAction () |
Catch an end of a custom animation. More... | |
void | Die () |
Sets IsAlive to false upon the character death. More... | |
void | OnHit (Hit hit) |
Affects the character spine by a bullet hit. More... | |
void | OnEject () |
Catch the magazine eject event from a reload animation. More... | |
void | OnRechamber () |
Catch the magazine rechamber event from a reload animation. More... | |
void | NotifyZoom () |
void | NotifyUnzoom () |
void | NotifyScope () |
void | NotifyUnscope () |
void | NotifyStartGunFire () |
Catch a gun starting a series of bullets. More... | |
void | NotifyStopGunFire () |
Catch a gun stopping a series of bullets. More... | |
void | NotifySuccessfulHit (Hit hit) |
Catch a successful bullet hit. More... | |
void | InputBlock () |
Tell the character to be block melee attacks. More... | |
void | InputPreciseHands () |
Tell the motor to slightly fix the hand IK so it aims precisely at the target. More... | |
void | InputUseWeapon () |
Suppossed to be called by the weapon use animation. More... | |
void | InputThrow () |
Supposed to be called by the grenade throw animation to release the grenade. More... | |
void | InputEndJump () |
Tell the motor the jump animation is over. More... | |
void | InputMidCoverOffset (float normalizedTime) |
Tell the motor to end a cover offset animation. More... | |
void | InputClimbStart () |
Tell the motor climbing has begun. More... | |
void | InputMidClimb (float normalizedTime) |
Tell the motor of the moment in the climb process. More... | |
void | InputEndClimb () |
Tell the motor to stop any climb process. More... | |
void | InputEndBulletLoad () |
Catch the end of a bullet load animation. More... | |
void | InputEndMagazineLoad () |
Catch the end of a magazine load animation or the load of a final bullet. More... | |
void | InputEndPump () |
Catch the end of a weapon pump animation. More... | |
void | InputVerticalMeleeAngle (float value) |
Tell the motor to look up or down during a melee. More... | |
void | InputFinishEquip () |
Catch the end of an equip animation. More... | |
void | InputGrabWeapon () |
Catch the moment in the equip animation when the character has grabbed the weapon. More... | |
void | InputUnequip () |
Catch the end of an unequip animation. More... | |
void | CancelAndPreventGetHit (float time, bool triggerAnimation=true) |
Cancel the get hit animation. More... | |
void | CancelGetHit (float time=0.3f, bool triggerAnimation=true) |
Cancel the get hit animation. More... | |
void | InputGetHit () |
Tell the motor it's currently in the GetHit state. More... | |
void | InputRecoil (float vertical, float horizontal) |
Input gun recoil angles. More... | |
void | StopAimingWhenEnteringCover () |
Prevents the character from aiming at a tall cover wall. More... | |
void | AskForLateUpdate (CharacterCamera camera) |
Tells the motor to update the given camera after it's own LateUpdate finishes. More... | |
void | InputCrouchNearCover () |
Should the character crouch near covers in the next frame. More... | |
void | InputSmoothRotation () |
Smooth rotation only animates the legs, leaving upper body stable and not wobbling. More... | |
void | InputArmLift () |
Tells the character to lift the weapon when running or standing in tall cover. More... | |
void | InputMirror () |
Tells the character to switch arms holding the weapon. More... | |
void | InputResurrect () |
Tells the character to resurrect and play the resurrection animation. More... | |
void | InputProcess (CharacterProcess desc) |
Tells the character to start a process. More... | |
void | InputProcessEnd () |
Stops the current process. More... | |
void | InputLayer (int value) |
Set's the renderer layer for the next frame. More... | |
void | InputTakeGrenade (GameObject grenadeOverride=null) |
Tells the character to take a grenade in hands. More... | |
void | InputCancelGrenade () |
Tells the character to put the grenade away. More... | |
void | InputThrowGrenade (Vector3 target, GameObject grenadeOverride=null) |
Inputs a command to throw a grenade to the given target location. More... | |
void | InputThrowGrenade (Vector3[] predictedPath, int predictedPathLength, float step, GameObject grenadeOverride=null) |
Calculates flight parameters given a path and launches the grenade. More... | |
void | InputThrowGrenade (Vector3 origin, Vector3 velocity, Vector3 target, GameObject grenadeOverride=null) |
Tells the character to throw a grenade in the given path. More... | |
void | InputRoll (float angle) |
Inputs a command to roll in a specific direction. More... | |
void | InputEndRoll () |
Make the motor stop rolling. More... | |
void | InputJump (float angle, float forwardMultiplier) |
Inputs a command to jump. More... | |
void | InputClimbOrVault (Cover cover) |
Inputs a command to climb or vault. More... | |
void | InputTakeCover () |
Inputs a command to take cover. More... | |
void | InputImmediateCoverSearch () |
Tells the motor to immediately update potential cover status. More... | |
void | InputLeaveCover () |
Makes the motor ignore any cover in the following frame. More... | |
void | InputMovement (CharacterMovement movement) |
Sets the character movement for the next update. More... | |
void | InputMoveForward (float strength=1) |
Sets the character to move forward during the next update. More... | |
void | InputMoveBack (float strength=1) |
Sets the character to move backwards during the next update. More... | |
void | InputMoveLeft (float strength=1) |
Sets the character to move left during the next update. More... | |
void | InputMoveRight (float strength=1) |
Sets the character to move right during the next update. More... | |
void | InputCrouch () |
Sets the character crouching state for the next update. More... | |
void | InputPossibleImmediateTurn (bool value=true) |
Sets the character to turn immediately if needed and allowed in the settings. More... | |
void | InputAim () |
Sets the character aim state for the next update. More... | |
void | InputAimWhenLeavingCover () |
Sets the character to avoid having a frame without aiming when leaving cover. More... | |
void | InputZoom () |
Sets the character up for zooming without a scope. More... | |
void | InputScope () |
Sets the character up for zooming with a scope. More... | |
void | InputUseToolAlternate () |
Sets the character to use the weapon as a tool in alternate mode. More... | |
void | InputUseTool (bool isAlternate=false) |
Sets the character to use the weapon as a tool. More... | |
void | InputMelee () |
Sets the character to use the weapon in melee and face in a certain direction. More... | |
void | InputMeleeTarget (Vector3 target) |
Sets the character to face in a certain direction during a melee. More... | |
void | InputMelee (Vector3 target) |
Sets the character to use the weapon in melee and face in a certain direction. More... | |
void | InputCombo (Vector3 target) |
Make the character continue a melee attack with a combo, if possible. More... | |
void | InputBeginMeleeScan (int id, Limb limb) |
Tell the motor to scan for melee collisions. More... | |
void | InputEndMeleeScan (int id, Limb limb) |
Tell the motor to stop scanning for melee collisions. More... | |
void | InputMeleeMoment (int id, Limb limb) |
Tell the motor to play an effect during a melee attack. More... | |
void | InputMeleeAttackStart (int id) |
Tell the motor to start the melee attack chain. More... | |
void | InputMeleeComboStart (int id) |
Tell the motor that next attack in a combo sequence has started. More... | |
void | InputMeleeAttackEnd () |
Tell the motor to stop the melee attack chain. More... | |
void | InputMeleeComboCheck () |
Check for the melee input to chain the combo. More... | |
void | StopMeleeRootMotion () |
No longer use the animator root motion during melee. More... | |
void | InputFire () |
Sets the character state of firing for the next update. More... | |
void | InputFireOnCondition (int ignoreSide) |
Sets the character state of firing for the next update. More... | |
void | InputReload () |
Attempts to start reloading a gun. More... | |
void | InputPump (float delay=0) |
Attempts to start a weapon pump animation. More... | |
void | InputStandLeft () |
Tells the character to face left relative to the cover. More... | |
void | InputStandRight () |
Tells the character to face right relative to the cover. More... | |
void | InputImmediateAim () |
Sets the character to enter aim animation immediately. More... | |
bool | IsFreeToMove (Vector3 direction) |
bool | IsFreeToMove (Vector3 direction, float distance, float height) |
bool | IsFree (Vector3 direction, float distance, float height, bool coverMeansFree, bool actorMeansFree) |
Public Attributes | |
bool | IsAlive = true |
Controls wheter the character is in a state of death. More... | |
float | Speed = 1.0f |
Speed multiplier for the movement speed. More... | |
float | MoveMultiplier = 1.0f |
Multiplies movement speed without adjusting animations. More... | |
bool | CanRun = true |
Toggles character's ability to run. More... | |
bool | CanSprint = true |
Toggles character's ability to run. More... | |
float | GroundThreshold = 0.3f |
Distance below feet to check for ground. More... | |
float | FallThreshold = 2.0f |
Minimal height to trigger state of falling. More... | |
float | ObstacleDistance = 0.05f |
Movement to obstacles closer than this is ignored. More... | |
float | Gravity = 10 |
Gravity force applied to this character. More... | |
float | RecoilRecovery = 17 |
Degrees recovered per second after a recoil. More... | |
bool | IsFiringFromCamera = true |
Sets the origin of bullet raycasts, either a camera or an end of a gun. More... | |
float | ZoomErrorMultiplier = 0.75f |
Gun accuracy increase when zooming in. More... | |
float | CrouchHeight = 1.5f |
Capsule height when crouching. More... | |
float | AccelerationDamp = 1 |
How long it takes for the animator to go from standing to full speed when issued a move command. More... | |
float | DeccelerationDamp = 3 |
How much the animator keeps moving after the character stops getting move commands. More... | |
float | DamageMultiplier = 1 |
Damage multiplier for weapons. More... | |
bool | IsEquipped = true |
Should the character hold the weapon in their hands. More... | |
WeaponDescription | Weapon = WeaponDescription.Default() |
Weapon description of the weapon the character is to equip. More... | |
WeaponDescription [] | Weapons |
Deprecated. More... | |
GrenadeSettings | Grenade = GrenadeSettings.Default() |
Grenade settings. More... | |
IKSettings | IK = IKSettings.Default() |
IK settings for the character. More... | |
CoverSettings | CoverSettings = CoverSettings.Default() |
Settings for cover behaviour. More... | |
ClimbSettings | ClimbSettings = ClimbSettings.Default() |
Settings for climbing. More... | |
VaultSettings | VaultSettings = VaultSettings.Default() |
Settings for climbing. More... | |
JumpSettings | JumpSettings = JumpSettings.Default() |
Settings for jumping. More... | |
RollSettings | RollSettings = RollSettings.Default() |
Settings for rolling. More... | |
AimSettings | AimSettings = AimSettings.Default() |
Settings for aiming. More... | |
TurnSettings | TurnSettings = TurnSettings.Default() |
Settings for turning. More... | |
ShoulderSettings | ShoulderSettings = ShoulderSettings.Default() |
Settings for camera pivot positions based on shoulders. More... | |
HitResponseSettings | HitResponseSettings = HitResponseSettings.Default() |
Settings for hit response IK. More... | |
Action< float > | StandingHeightChanged |
Executed when the normal standing height changes. More... | |
Action< float > | CurrentHeightChanged |
Executed when the current height changes. More... | |
Action | WeaponChangeStarted |
Executed when the weapon change starts. More... | |
Action | WeaponChanged |
Executed when a weapon change stops and the character has a new weapon armed. More... | |
Action | FireStarted |
Executed after the character stars firing. More... | |
Action | FireStopped |
Executed after the character stops firing. More... | |
Action | ReloadStarted |
Executed when the weapon reload starts. More... | |
Action | FullyLoaded |
Executed after a weapon is fully laoded. More... | |
Action | BulletLoaded |
Executed after a bullet is loaded. More... | |
Action | Pumped |
Executed after a weapon is pumped. More... | |
Action< Hit > | SuccessfullyHit |
Executed after a weapon successfully hit's something. More... | |
Action< Cover > | EnteredCover |
Executed on character entering a cover. More... | |
Action | ExitedCover |
Executed on character leaving a cover. More... | |
Action | Resurrected |
Executed after the character changes from dead to alive. More... | |
Action | Died |
Executed on character death. More... | |
Action | UsedTool |
Executed after a tool was used. More... | |
Action | UsedToolAlternate |
Executed after an alternative mode of a tool was used. More... | |
Action | Jumped |
Executed on any jump. More... | |
Action | Stepped |
Executed on every footstep. More... | |
Action | Landed |
Executed on character landing after a fall. More... | |
Action | Zoomed |
Executed when the character starts zooming in. More... | |
Action | Unzoomed |
Executed after the character stops zooming in. More... | |
Action | Scoped |
Action | Unscoped |
Properties | |
Vector3 | BodyLookTarget [get] |
Position the body is rotated at. More... | |
Vector3 | AimTarget [get] |
Position the body is aiming at. More... | |
Vector3 | ClosestCoverPosition [get] |
Closest position on the cover to the character. More... | |
Vector3 | AimForward [get] |
Horizontal aim vector. More... | |
bool | IsPerformingCustomAction [get] |
Is the motor currently performing a custom action. More... | |
bool | IsInProcess [get] |
Is the motor currently in a custom process. More... | |
bool | CanMoveInProcess [get] |
Is the character currently in a process and that process allows movement. More... | |
bool | IsClimbingOrVaulting [get] |
Is character currently climbing or vaulting. More... | |
bool | IsVaulting [get] |
Is character currently vaulting. More... | |
float | VerticalMeleeAngle [get] |
Vertical angle the motor is rotated towards when performing a melee attack. More... | |
float | VaultPosition [get] |
Y coordinate of the character position before the vault. More... | |
bool | IsInCover [get] |
Is the character currently in cover. More... | |
bool | IsCrouching [get] |
Is the character currently crouching. More... | |
bool | IsLow [get] |
Is the character currently crouching or in low cover. More... | |
float | BodyAngle [get] |
Degrees in world space of direction the character is intended to face. More... | |
bool | IsStandingLeftInCover [get] |
Is the character currently facing left in a cover. More... | |
bool | WantsToMaintainMirror [get] |
Does the character have switched arms and wants to keep that for at least another frame. More... | |
bool | IsInLowCover [get] |
Is the character currently in low cover. More... | |
bool | IsInTallCover [get] |
Is the character currently in tall cover. More... | |
bool | IsCrouchingInTallCover [get] |
Is the character currently in tall cover and crouching. More... | |
bool | IsFalling [get] |
Is the character currently falling without control. More... | |
bool | IsGrounded [get] |
Is the character currently touching ground. More... | |
bool | IsJumping [get] |
Is the character currently jumping (false if it entered a long fall). More... | |
float | GroundTimer [get] |
Time in seconds the character has stayed on the ground since last fall. More... | |
bool | IsAimingThroughCoverPlane [get] |
Is the line between the player and target blocked by a close cover. More... | |
float | VerticalRecoil [get] |
Vertical shift in degrees of the weapon affected by recoil. More... | |
float | HorizontalRecoil [get] |
Horizontal shift in degrees of the weapon affected by recoil. More... | |
WeaponDescription | ActiveWeapon [get] |
Weapon currently held or intended to be held in hands (EquippedWeapon is set to none in the middle of changing weapons whereas ActiveWeapon is not). More... | |
WeaponDescription | EquippedWeapon [get] |
Weapon currently held in hands. More... | |
WeaponEquipState | WeaponEquipState [get] |
State of the weapon in character's hands. More... | |
bool | IsChangingWeapon [get] |
Is currently switching to a different weapon or unequipping. More... | |
bool | IsChangingWeaponOrHasJustChanged [get] |
Is currently switching to a different weapon or has equipped in the last few frames. More... | |
bool | IsInCameraAimableState [get] |
Can the camera zoom in right now for aiming. More... | |
bool | IsInAimableState [get] |
Can the character possibly use scope when aiming. More... | |
bool | IsLeftHandAimReady [get] |
Should the character use IK to put the left hand in the correct position. More... | |
bool | IsZooming [get] |
Is the motor aiming in on a weapon. More... | |
bool | IsScoping [get] |
Is the motor using a scope on a weapon. More... | |
bool | IsWeaponReady [get] |
Is the gun not being changed or reloaded. More... | |
bool | IsReloading [get] |
Is the weapon currently in any reload animation. More... | |
bool | IsReloadingAndNotAiming [get] |
Is the weapon currently in any reload animation that prevents aiming. More... | |
bool | IsWeaponScopeReady [get] |
Is the weapon usable for scoping right now. More... | |
bool | IsGettingHit [get] |
Is character currently acting in pain. More... | |
bool | IsGunReady [get] |
Is the gun not being changed or reloaded. More... | |
bool | IsGunScopeReady [get] |
Is the current 'weapon' a gun and usable for scoping right now. More... | |
bool | IsMeleeReady [get] |
Is the weapon not being changed or reloaded. More... | |
bool | IsBlocking [get] |
Is the character currently blocking melee attacks. More... | |
bool | IsRolling [get] |
Is the character currently rolling. More... | |
bool | IsGoingToSprint [get] |
Is the character going to sprint. More... | |
bool | IsSprinting [get] |
Is the character currently sprinting. More... | |
bool | IsLoadingBullet [get] |
Is the motor currently loading a bullet. More... | |
bool | IsLoadingMagazine [get] |
Is the motor currently loading a magazine. More... | |
bool | IsPumping [get] |
Is the motor currently pumping the weapon. More... | |
bool | IsByAnOpenLeftCorner [get] |
Is the character by a tall cover's left corner they can take a peek from. More... | |
bool | IsByAnOpenRightCorner [get] |
Is the character by a tall cover's right corner they can take a peek from. More... | |
bool | IsNearLeftCorner [get] |
Is the character currently in cover and standing near the left corner. More... | |
bool | IsNearRightCorner [get] |
Is the character currently in cover and standing near the right corner. More... | |
bool | IsMovingToCoverOffset [get] |
Is the currently transitioning between cover offsets More... | |
bool | IsMovingToCoverOffsetAndCantAim [get] |
Is the currently transitioning between cover offsets and the gun cannot be aimed More... | |
Cover | Cover [get] |
Returns the object of the current taken cover. More... | |
int | CoverDirection [get] |
Currently faced direction in cover. More... | |
Cover | LeftCover [get] |
Returns the object of the cover left to the current cover. More... | |
Cover | RightCover [get] |
Returns the object of the cover right to the current cover. More... | |
Vector3 | ConceptualAimOrigin [get] |
Origin from which various aiming decisions and blending is performed. More... | |
Vector3 | AccurateAimOrigin [get] |
Aim origin as if the character is already aiming at the target. More... | |
Vector3 | AimOriginWithCoverOffset [get] |
Origin from which various aiming decisions and blending is performed. More... | |
Vector3 | VirtualHead [get] |
Virtual position at which the head is considered to be located. More... | |
Vector3 | GunOrigin [get] |
Position of the currently held gun where bullets would appear. More... | |
Vector3 | GunDirection [get] |
Direction of the gun affected by recoil. More... | |
Vector3 | Top [get] |
Position of the top of the capsule. More... | |
bool | WouldAim [get] |
Is the character in a state where they want to aim. More... | |
bool | IsAimingTool [get] |
Is aiming a tool. More... | |
bool | WasAimingGun [get] |
Was the motor aiming a gun during a previous frame. More... | |
bool | IsAimingGun [get] |
Is aiming or intending to aim. More... | |
bool | IsAiming [get] |
Is currently aiming a gun or grenade. More... | |
bool | IsInAnySideOffset [get] |
Is the motor currently either in or transitioning from or to side cover offset. More... | |
bool | IsInCoverOffset [get] |
Is the motor currently fully in cover offset. More... | |
bool | IsWalkingOrStanding [get] |
Is the character currently walking or standing. More... | |
Vector3 | MovementDirection [get] |
Current movement direction. More... | |
bool | IsWalkingInCover [get] |
Was there any intended movement in cover. More... | |
float | StandingHeight [get] |
Returns height when standing. More... | |
float | CurrentHeight [get] |
Returns current height of the capsule collider. More... | |
float | TargetHeight [get] |
Height the capsule is reaching for. More... | |
bool | HasGrenadeInHand [get] |
Returns true if the character has a grenade in a hand More... | |
bool | IsReadyToThrowGrenade [get] |
Returns true if the character has a grenade in hand and ready to throw it. More... | |
bool | IsThrowingGrenade [get] |
Is the motor currently throwing or has just thrown a grenade. More... | |
Grenade | PotentialGrenade [get] |
Grenade that would be potentially displayed in a hand if thrown. More... | |
Grenade | CurrentGrenade [get] |
Returns currently displayed grenade object in a hand. More... | |
bool | IsThrowingLeft [get] |
Returns true if in current situation grenades would be thrown with the left hand. More... | |
Cover | PotentialCover [get] |
Returns cover object the character is closest to and able to take. More... | |
bool | IsMoving [get] |
Is the character currently moving. More... | |
float | Movement [get] |
Current movement speed. More... | |
float | MovementError [get] |
Accuracy error produced by movement. More... | |
bool | IsPerformingMelee [get] |
Is the character currently performing a melee attack. More... | |
Characters must have a Character Motor component attached.
It manages the character, it’s movement, appearance and use of weapons. It handles gravity and therefore gravity should be turned off in the RigidBody component to avoid conflicts. There is an IK (inverse-kinematics) system that handles aiming and recoil. It can be configured manually but for ease of use there is a button to set it up automatically inside the CharacterMotor inspector. It is recommended to reduce the amount of bones used by IK on non-player characters for performance reasons. IK is calculated by adjusting bones until certain objects reach defined targets. Target objects must be part of the skeleton in order for changes to modify their transform. Character’s sight is usually defined by a marker object that is part of the head, bones are transformed until marker’s forward vector points towards the target. Each character has a set of weapons in its disposal. To add a new weapon to the character you must create an object with a 3D model and a Gun component and attach it to a hand. Additionally, you can create a version of the weapon that is put into its holster. The motor automatically enables and disables weapon and holster objects. Characters can throw grenades from both hands. Left hand is used in some situations when the character is hiding behind a cover. Grenades are duplicated when thrown. A character can be setup to have many hitboxes for various body parts. Setup is done inside Character Health component.
void CoverShooter.CharacterMotor.AskForLateUpdate | ( | CharacterCamera | camera | ) |
Tells the motor to update the given camera after it's own LateUpdate finishes.
GameObject CoverShooter.CharacterMotor.AskForTarget | ( | ) |
An object the motor is currently aiming at.
Only objects with CharacterHealth are considered.
void CoverShooter.CharacterMotor.CancelAndPreventGetHit | ( | float | time, |
bool | triggerAnimation = true |
||
) |
Cancel the get hit animation.
void CoverShooter.CharacterMotor.CancelGetHit | ( | float | time = 0.3f , |
bool | triggerAnimation = true |
||
) |
Cancel the get hit animation.
void CoverShooter.CharacterMotor.Die | ( | ) |
Sets IsAlive to false upon the character death.
Cover CoverShooter.CharacterMotor.GetClimbableInDirection | ( | Vector3 | direction | ) |
Returns a potential climbable cover in given direction.
Cover CoverShooter.CharacterMotor.GetClimbambleInDirection | ( | float | angle | ) |
Returns a potential climbable cover in given direction represented by a horizontal angle in world space.
void CoverShooter.CharacterMotor.InputAim | ( | ) |
Sets the character aim state for the next update.
void CoverShooter.CharacterMotor.InputAimWhenLeavingCover | ( | ) |
Sets the character to avoid having a frame without aiming when leaving cover.
void CoverShooter.CharacterMotor.InputArmLift | ( | ) |
Tells the character to lift the weapon when running or standing in tall cover.
void CoverShooter.CharacterMotor.InputBeginMeleeScan | ( | int | id, |
Limb | limb | ||
) |
Tell the motor to scan for melee collisions.
void CoverShooter.CharacterMotor.InputBlock | ( | ) |
Tell the character to be block melee attacks.
void CoverShooter.CharacterMotor.InputCancelGrenade | ( | ) |
Tells the character to put the grenade away.
void CoverShooter.CharacterMotor.InputClimbOrVault | ( | Cover | cover | ) |
Inputs a command to climb or vault.
void CoverShooter.CharacterMotor.InputClimbStart | ( | ) |
Tell the motor climbing has begun.
void CoverShooter.CharacterMotor.InputCombo | ( | Vector3 | target | ) |
Make the character continue a melee attack with a combo, if possible.
void CoverShooter.CharacterMotor.InputCrouch | ( | ) |
Sets the character crouching state for the next update.
void CoverShooter.CharacterMotor.InputCrouchNearCover | ( | ) |
Should the character crouch near covers in the next frame.
void CoverShooter.CharacterMotor.InputEndBulletLoad | ( | ) |
Catch the end of a bullet load animation.
void CoverShooter.CharacterMotor.InputEndClimb | ( | ) |
Tell the motor to stop any climb process.
void CoverShooter.CharacterMotor.InputEndJump | ( | ) |
Tell the motor the jump animation is over.
void CoverShooter.CharacterMotor.InputEndMagazineLoad | ( | ) |
Catch the end of a magazine load animation or the load of a final bullet.
void CoverShooter.CharacterMotor.InputEndMeleeScan | ( | int | id, |
Limb | limb | ||
) |
Tell the motor to stop scanning for melee collisions.
void CoverShooter.CharacterMotor.InputEndPump | ( | ) |
Catch the end of a weapon pump animation.
void CoverShooter.CharacterMotor.InputEndRoll | ( | ) |
Make the motor stop rolling.
void CoverShooter.CharacterMotor.InputFinishEquip | ( | ) |
Catch the end of an equip animation.
void CoverShooter.CharacterMotor.InputFire | ( | ) |
Sets the character state of firing for the next update.
void CoverShooter.CharacterMotor.InputFireOnCondition | ( | int | ignoreSide | ) |
Sets the character state of firing for the next update.
Fires only if the target is not a friend.
void CoverShooter.CharacterMotor.InputGetHit | ( | ) |
Tell the motor it's currently in the GetHit state.
void CoverShooter.CharacterMotor.InputGrabWeapon | ( | ) |
Catch the moment in the equip animation when the character has grabbed the weapon.
void CoverShooter.CharacterMotor.InputImmediateAim | ( | ) |
Sets the character to enter aim animation immediately.
void CoverShooter.CharacterMotor.InputImmediateCoverSearch | ( | ) |
Tells the motor to immediately update potential cover status.
void CoverShooter.CharacterMotor.InputJump | ( | float | angle, |
float | forwardMultiplier | ||
) |
Inputs a command to jump.
void CoverShooter.CharacterMotor.InputLayer | ( | int | value | ) |
Set's the renderer layer for the next frame.
void CoverShooter.CharacterMotor.InputLeaveCover | ( | ) |
Makes the motor ignore any cover in the following frame.
void CoverShooter.CharacterMotor.InputMelee | ( | ) |
Sets the character to use the weapon in melee and face in a certain direction.
void CoverShooter.CharacterMotor.InputMelee | ( | Vector3 | target | ) |
Sets the character to use the weapon in melee and face in a certain direction.
void CoverShooter.CharacterMotor.InputMeleeAttackEnd | ( | ) |
Tell the motor to stop the melee attack chain.
void CoverShooter.CharacterMotor.InputMeleeAttackStart | ( | int | id | ) |
Tell the motor to start the melee attack chain.
void CoverShooter.CharacterMotor.InputMeleeComboCheck | ( | ) |
Check for the melee input to chain the combo.
void CoverShooter.CharacterMotor.InputMeleeComboStart | ( | int | id | ) |
Tell the motor that next attack in a combo sequence has started.
void CoverShooter.CharacterMotor.InputMeleeMoment | ( | int | id, |
Limb | limb | ||
) |
Tell the motor to play an effect during a melee attack.
void CoverShooter.CharacterMotor.InputMeleeTarget | ( | Vector3 | target | ) |
Sets the character to face in a certain direction during a melee.
void CoverShooter.CharacterMotor.InputMidClimb | ( | float | normalizedTime | ) |
Tell the motor of the moment in the climb process.
void CoverShooter.CharacterMotor.InputMidCoverOffset | ( | float | normalizedTime | ) |
Tell the motor to end a cover offset animation.
void CoverShooter.CharacterMotor.InputMirror | ( | ) |
Tells the character to switch arms holding the weapon.
Used when aiming and standing in tall cover facing left.
void CoverShooter.CharacterMotor.InputMoveBack | ( | float | strength = 1 | ) |
Sets the character to move backwards during the next update.
void CoverShooter.CharacterMotor.InputMoveForward | ( | float | strength = 1 | ) |
Sets the character to move forward during the next update.
void CoverShooter.CharacterMotor.InputMoveLeft | ( | float | strength = 1 | ) |
Sets the character to move left during the next update.
void CoverShooter.CharacterMotor.InputMovement | ( | CharacterMovement | movement | ) |
Sets the character movement for the next update.
void CoverShooter.CharacterMotor.InputMoveRight | ( | float | strength = 1 | ) |
Sets the character to move right during the next update.
void CoverShooter.CharacterMotor.InputPossibleImmediateTurn | ( | bool | value = true | ) |
Sets the character to turn immediately if needed and allowed in the settings.
void CoverShooter.CharacterMotor.InputPreciseHands | ( | ) |
Tell the motor to slightly fix the hand IK so it aims precisely at the target.
void CoverShooter.CharacterMotor.InputProcess | ( | CharacterProcess | desc | ) |
Tells the character to start a process.
An action is performed and the character returns back to the usual routine.
void CoverShooter.CharacterMotor.InputProcessEnd | ( | ) |
Stops the current process.
void CoverShooter.CharacterMotor.InputPump | ( | float | delay = 0 | ) |
Attempts to start a weapon pump animation.
void CoverShooter.CharacterMotor.InputRecoil | ( | float | vertical, |
float | horizontal | ||
) |
Input gun recoil angles.
Gun position offset is calculated from the given angles.
void CoverShooter.CharacterMotor.InputReload | ( | ) |
Attempts to start reloading a gun.
void CoverShooter.CharacterMotor.InputResurrect | ( | ) |
Tells the character to resurrect and play the resurrection animation.
void CoverShooter.CharacterMotor.InputRoll | ( | float | angle | ) |
Inputs a command to roll in a specific direction.
void CoverShooter.CharacterMotor.InputScope | ( | ) |
Sets the character up for zooming with a scope.
void CoverShooter.CharacterMotor.InputSmoothRotation | ( | ) |
Smooth rotation only animates the legs, leaving upper body stable and not wobbling.
Useful when the camera is zooming in.
void CoverShooter.CharacterMotor.InputStandLeft | ( | ) |
Tells the character to face left relative to the cover.
void CoverShooter.CharacterMotor.InputStandRight | ( | ) |
Tells the character to face right relative to the cover.
void CoverShooter.CharacterMotor.InputTakeCover | ( | ) |
Inputs a command to take cover.
void CoverShooter.CharacterMotor.InputTakeGrenade | ( | GameObject | grenadeOverride = null | ) |
Tells the character to take a grenade in hands.
void CoverShooter.CharacterMotor.InputThrow | ( | ) |
Supposed to be called by the grenade throw animation to release the grenade.
void CoverShooter.CharacterMotor.InputThrowGrenade | ( | Vector3 | target, |
GameObject | grenadeOverride = null |
||
) |
Inputs a command to throw a grenade to the given target location.
void CoverShooter.CharacterMotor.InputThrowGrenade | ( | Vector3 [] | predictedPath, |
int | predictedPathLength, | ||
float | step, | ||
GameObject | grenadeOverride = null |
||
) |
Calculates flight parameters given a path and launches the grenade.
void CoverShooter.CharacterMotor.InputThrowGrenade | ( | Vector3 | origin, |
Vector3 | velocity, | ||
Vector3 | target, | ||
GameObject | grenadeOverride = null |
||
) |
Tells the character to throw a grenade in the given path.
void CoverShooter.CharacterMotor.InputUnequip | ( | ) |
Catch the end of an unequip animation.
void CoverShooter.CharacterMotor.InputUseTool | ( | bool | isAlternate = false | ) |
Sets the character to use the weapon as a tool.
void CoverShooter.CharacterMotor.InputUseToolAlternate | ( | ) |
Sets the character to use the weapon as a tool in alternate mode.
void CoverShooter.CharacterMotor.InputUseWeapon | ( | ) |
Suppossed to be called by the weapon use animation.
void CoverShooter.CharacterMotor.InputVerticalMeleeAngle | ( | float | value | ) |
Tell the motor to look up or down during a melee.
void CoverShooter.CharacterMotor.InputZoom | ( | ) |
Sets the character up for zooming without a scope.
Implicitly calls InputAim()
bool CoverShooter.CharacterMotor.IsFree | ( | Vector3 | direction, |
float | distance, | ||
float | height, | ||
bool | coverMeansFree, | ||
bool | actorMeansFree | ||
) |
bool CoverShooter.CharacterMotor.IsFreeToMove | ( | Vector3 | direction | ) |
bool CoverShooter.CharacterMotor.IsFreeToMove | ( | Vector3 | direction, |
float | distance, | ||
float | height | ||
) |
bool CoverShooter.CharacterMotor.IsPerformingMeleeId | ( | int | id | ) |
void CoverShooter.CharacterMotor.NotifyScope | ( | ) |
void CoverShooter.CharacterMotor.NotifyStartGunFire | ( | ) |
Catch a gun starting a series of bullets.
void CoverShooter.CharacterMotor.NotifyStopGunFire | ( | ) |
Catch a gun stopping a series of bullets.
void CoverShooter.CharacterMotor.NotifySuccessfulHit | ( | Hit | hit | ) |
Catch a successful bullet hit.
void CoverShooter.CharacterMotor.NotifyUnscope | ( | ) |
void CoverShooter.CharacterMotor.NotifyUnzoom | ( | ) |
void CoverShooter.CharacterMotor.NotifyZoom | ( | ) |
void CoverShooter.CharacterMotor.OnCustomAction | ( | string | name | ) |
Catch custom input coming from the controller.
void CoverShooter.CharacterMotor.OnEject | ( | ) |
Catch the magazine eject event from a reload animation.
void CoverShooter.CharacterMotor.OnFinishCustomAction | ( | ) |
Catch an end of a custom animation.
void CoverShooter.CharacterMotor.OnHit | ( | Hit | hit | ) |
Affects the character spine by a bullet hit.
void CoverShooter.CharacterMotor.OnRechamber | ( | ) |
Catch the magazine rechamber event from a reload animation.
void CoverShooter.CharacterMotor.Resurrect | ( | ) |
Catch the animation event at the end of the resurrection.
void CoverShooter.CharacterMotor.SetAimTarget | ( | Vector3 | target | ) |
Sets the position for the character to look and aim at.
void CoverShooter.CharacterMotor.SetBodyTarget | ( | Vector3 | target, |
float | speed = 8f |
||
) |
Sets the position for the character body to turn to.
void CoverShooter.CharacterMotor.StopAimingWhenEnteringCover | ( | ) |
Prevents the character from aiming at a tall cover wall.
void CoverShooter.CharacterMotor.StopMeleeRootMotion | ( | ) |
No longer use the animator root motion during melee.
float CoverShooter.CharacterMotor.AccelerationDamp = 1 |
How long it takes for the animator to go from standing to full speed when issued a move command.
AimSettings CoverShooter.CharacterMotor.AimSettings = AimSettings.Default() |
Settings for aiming.
Action CoverShooter.CharacterMotor.BulletLoaded |
Executed after a bullet is loaded.
bool CoverShooter.CharacterMotor.CanRun = true |
Toggles character's ability to run.
Used by the CharacterStamina.
bool CoverShooter.CharacterMotor.CanSprint = true |
Toggles character's ability to run.
Used by the CharacterStamina.
ClimbSettings CoverShooter.CharacterMotor.ClimbSettings = ClimbSettings.Default() |
Settings for climbing.
CoverSettings CoverShooter.CharacterMotor.CoverSettings = CoverSettings.Default() |
Settings for cover behaviour.
float CoverShooter.CharacterMotor.CrouchHeight = 1.5f |
Capsule height when crouching.
Action<float> CoverShooter.CharacterMotor.CurrentHeightChanged |
Executed when the current height changes.
float CoverShooter.CharacterMotor.DamageMultiplier = 1 |
Damage multiplier for weapons.
float CoverShooter.CharacterMotor.DeccelerationDamp = 3 |
How much the animator keeps moving after the character stops getting move commands.
Action CoverShooter.CharacterMotor.Died |
Executed on character death.
Action<Cover> CoverShooter.CharacterMotor.EnteredCover |
Executed on character entering a cover.
Invoked on any cover change as well.
Action CoverShooter.CharacterMotor.ExitedCover |
Executed on character leaving a cover.
float CoverShooter.CharacterMotor.FallThreshold = 2.0f |
Minimal height to trigger state of falling.
It’s ignored when jumping over gaps.
Action CoverShooter.CharacterMotor.FireStarted |
Executed after the character stars firing.
Action CoverShooter.CharacterMotor.FireStopped |
Executed after the character stops firing.
Action CoverShooter.CharacterMotor.FullyLoaded |
Executed after a weapon is fully laoded.
float CoverShooter.CharacterMotor.Gravity = 10 |
Gravity force applied to this character.
GrenadeSettings CoverShooter.CharacterMotor.Grenade = GrenadeSettings.Default() |
Grenade settings.
float CoverShooter.CharacterMotor.GroundThreshold = 0.3f |
Distance below feet to check for ground.
HitResponseSettings CoverShooter.CharacterMotor.HitResponseSettings = HitResponseSettings.Default() |
Settings for hit response IK.
IKSettings CoverShooter.CharacterMotor.IK = IKSettings.Default() |
IK settings for the character.
bool CoverShooter.CharacterMotor.IsAlive = true |
Controls wheter the character is in a state of death.
Dead characters have no collisions and ignore any input.
bool CoverShooter.CharacterMotor.IsEquipped = true |
Should the character hold the weapon in their hands.
Change is not immediate.
bool CoverShooter.CharacterMotor.IsFiringFromCamera = true |
Sets the origin of bullet raycasts, either a camera or an end of a gun.
Action CoverShooter.CharacterMotor.Jumped |
Executed on any jump.
JumpSettings CoverShooter.CharacterMotor.JumpSettings = JumpSettings.Default() |
Settings for jumping.
Action CoverShooter.CharacterMotor.Landed |
Executed on character landing after a fall.
float CoverShooter.CharacterMotor.MoveMultiplier = 1.0f |
Multiplies movement speed without adjusting animations.
float CoverShooter.CharacterMotor.ObstacleDistance = 0.05f |
Movement to obstacles closer than this is ignored.
It is mainly used to prevent character running into walls.
Action CoverShooter.CharacterMotor.Pumped |
Executed after a weapon is pumped.
float CoverShooter.CharacterMotor.RecoilRecovery = 17 |
Degrees recovered per second after a recoil.
Action CoverShooter.CharacterMotor.ReloadStarted |
Executed when the weapon reload starts.
Action CoverShooter.CharacterMotor.Resurrected |
Executed after the character changes from dead to alive.
RollSettings CoverShooter.CharacterMotor.RollSettings = RollSettings.Default() |
Settings for rolling.
Action CoverShooter.CharacterMotor.Scoped |
ShoulderSettings CoverShooter.CharacterMotor.ShoulderSettings = ShoulderSettings.Default() |
Settings for camera pivot positions based on shoulders.
float CoverShooter.CharacterMotor.Speed = 1.0f |
Speed multiplier for the movement speed.
Adjusts animations.
Action<float> CoverShooter.CharacterMotor.StandingHeightChanged |
Executed when the normal standing height changes.
Action CoverShooter.CharacterMotor.Stepped |
Executed on every footstep.
Action<Hit> CoverShooter.CharacterMotor.SuccessfullyHit |
Executed after a weapon successfully hit's something.
TurnSettings CoverShooter.CharacterMotor.TurnSettings = TurnSettings.Default() |
Settings for turning.
Action CoverShooter.CharacterMotor.Unscoped |
Action CoverShooter.CharacterMotor.Unzoomed |
Executed after the character stops zooming in.
Action CoverShooter.CharacterMotor.UsedTool |
Executed after a tool was used.
Action CoverShooter.CharacterMotor.UsedToolAlternate |
Executed after an alternative mode of a tool was used.
VaultSettings CoverShooter.CharacterMotor.VaultSettings = VaultSettings.Default() |
Settings for climbing.
WeaponDescription CoverShooter.CharacterMotor.Weapon = WeaponDescription.Default() |
Weapon description of the weapon the character is to equip.
Action CoverShooter.CharacterMotor.WeaponChanged |
Executed when a weapon change stops and the character has a new weapon armed.
Action CoverShooter.CharacterMotor.WeaponChangeStarted |
Executed when the weapon change starts.
WeaponDescription [] CoverShooter.CharacterMotor.Weapons |
Deprecated.
Use Upgrade Weapon List button to update to the newer version of the asset.
Action CoverShooter.CharacterMotor.Zoomed |
Executed when the character starts zooming in.
float CoverShooter.CharacterMotor.ZoomErrorMultiplier = 0.75f |
Gun accuracy increase when zooming in.
Multiplier gun error.
|
get |
Aim origin as if the character is already aiming at the target.
|
get |
Weapon currently held or intended to be held in hands (EquippedWeapon is set to none in the middle of changing weapons whereas ActiveWeapon is not).
|
get |
Horizontal aim vector.
|
get |
Origin from which various aiming decisions and blending is performed.
Position is based on the current character position and no the virtual one.
|
get |
Position the body is aiming at.
|
get |
Degrees in world space of direction the character is intended to face.
|
get |
Position the body is rotated at.
|
get |
Is the character currently in a process and that process allows movement.
|
get |
Closest position on the cover to the character.
Returns character position if no cover available.
|
get |
Origin from which various aiming decisions and blending is performed.
|
get |
Returns the object of the current taken cover.
|
get |
Currently faced direction in cover.
-1 for left, 1 for right.
|
get |
Returns currently displayed grenade object in a hand.
|
get |
Returns current height of the capsule collider.
|
get |
Weapon currently held in hands.
|
get |
Time in seconds the character has stayed on the ground since last fall.
|
get |
Direction of the gun affected by recoil.
|
get |
Position of the currently held gun where bullets would appear.
|
get |
Returns true if the character has a grenade in a hand
|
get |
Horizontal shift in degrees of the weapon affected by recoil.
|
get |
Is currently aiming a gun or grenade.
|
get |
Is aiming or intending to aim.
|
get |
Is the line between the player and target blocked by a close cover.
Used to determine if the player should stand up when aiming from low cover.
|
get |
Is aiming a tool.
|
get |
Is the character currently blocking melee attacks.
|
get |
Is the character by a tall cover's left corner they can take a peek from.
|
get |
Is the character by a tall cover's right corner they can take a peek from.
|
get |
Is currently switching to a different weapon or unequipping.
|
get |
Is currently switching to a different weapon or has equipped in the last few frames.
|
get |
Is character currently climbing or vaulting.
|
get |
Is the character currently crouching.
|
get |
Is the character currently in tall cover and crouching.
|
get |
Is the character currently falling without control.
|
get |
Is character currently acting in pain.
|
get |
Is the character going to sprint.
True when already sprinting.
|
get |
Is the character currently touching ground.
|
get |
Is the gun not being changed or reloaded.
|
get |
Is the current 'weapon' a gun and usable for scoping right now.
|
get |
Can the character possibly use scope when aiming.
|
get |
Is the motor currently either in or transitioning from or to side cover offset.
|
get |
Can the camera zoom in right now for aiming.
|
get |
Is the character currently in cover.
|
get |
Is the motor currently fully in cover offset.
|
get |
Is the character currently in low cover.
|
get |
Is the motor currently in a custom process.
|
get |
Is the character currently in tall cover.
|
get |
Is the character currently jumping (false if it entered a long fall).
|
get |
Should the character use IK to put the left hand in the correct position.
|
get |
Is the motor currently loading a bullet.
|
get |
Is the motor currently loading a magazine.
|
get |
Is the character currently crouching or in low cover.
|
get |
Is the weapon not being changed or reloaded.
|
get |
Is the character currently moving.
|
get |
Is the currently transitioning between cover offsets
|
get |
Is the currently transitioning between cover offsets and the gun cannot be aimed
|
get |
Is the character currently in cover and standing near the left corner.
|
get |
Is the character currently in cover and standing near the right corner.
|
get |
Is the motor currently performing a custom action.
|
get |
Is the character currently performing a melee attack.
|
get |
Is the motor currently pumping the weapon.
|
get |
Returns true if the character has a grenade in hand and ready to throw it.
|
get |
Is the weapon currently in any reload animation.
|
get |
Is the weapon currently in any reload animation that prevents aiming.
|
get |
Is the character currently rolling.
|
get |
Is the motor using a scope on a weapon.
|
get |
Is the character currently sprinting.
|
get |
Is the character currently facing left in a cover.
|
get |
Is the motor currently throwing or has just thrown a grenade.
|
get |
Returns true if in current situation grenades would be thrown with the left hand.
|
get |
Is character currently vaulting.
|
get |
Was there any intended movement in cover.
|
get |
Is the character currently walking or standing.
|
get |
Is the gun not being changed or reloaded.
|
get |
Is the weapon usable for scoping right now.
|
get |
Is the motor aiming in on a weapon.
|
get |
Returns the object of the cover left to the current cover.
|
get |
Current movement speed.
|
get |
Current movement direction.
Zero if standing still.
|
get |
Accuracy error produced by movement.
|
get |
Returns cover object the character is closest to and able to take.
|
get |
Grenade that would be potentially displayed in a hand if thrown.
|
get |
Returns the object of the cover right to the current cover.
|
get |
Returns height when standing.
|
get |
Height the capsule is reaching for.
|
get |
Position of the top of the capsule.
|
get |
Y coordinate of the character position before the vault.
|
get |
Vertical angle the motor is rotated towards when performing a melee attack.
|
get |
Vertical shift in degrees of the weapon affected by recoil.
|
get |
Virtual position at which the head is considered to be located.
|
get |
Does the character have switched arms and wants to keep that for at least another frame.
|
get |
Was the motor aiming a gun during a previous frame.
|
get |
State of the weapon in character's hands.
|
get |
Is the character in a state where they want to aim.