Action Setup
Each Action Script do not get executed via their own Update(), But through ActionManager instead UnitSetupEditor should do this automatically for you. If you want to set this up Manually, In Action List, increase the size According to what you wanted, And Plug The Action Script to Action List. Action in the top will override the one below if activated
Last Updated in 2.0
Motion Data Refs Curves from V2.0 and before got replace with this **Unity Pro is no longer required ------------------------------------------ Each Action use MotionDataRef ScriptableObjects to determine when to control MatchTarget and toggle Collider If they are not inserted into Action Component, function LoadMotionData() will automatically insert
them for you, as long as the Data is within a Resources folder.
These data are specific to Motions in Animation
Controller, and they are referenced by all Characters.
A change to them will conveniently affect every Characters
If there is a Character that use a different Controller
with different Motion, create a new one specifically for that Character.
Last Updated in 3.0
**Updated in 3.0** Can be created via Unit Setup Editor
Motion Data Refs
For Action MotionDataRef, Inside ColliderOn, Collider will be turn Off when
Motion Normalized Time is inside the range. Inside MatchTarget, based on Base Layer Motion’s
NormalizedTime The Left Value is when MatchTargetStart Right Value is when MatchTargetStop If you prefer built in numbers to the Script instead, These data are referenced via motionDataRef, you
can substitute the parts that have them.
Last Updated in 2.3
**IMPORTANT** As Serialized ScriptableObject, Change to these Data during Runtime Are Permanent
Free Running
Some Motion Control require Action Input to be use However, if Unit is doing FreeRunning, Action input will be automatically made Doing FreeRunning will also increase SearchDistance parameter on some motion FreeRunning Toggle is mapped to Tab key by Default Free Running is known to have serious bug, it is temporarily taken out from Input. But the rest of Action Script that utilize it remain the same.
Last Updated in 2. 5
Grounding
Inside UnitControl_ActionManager, it will check at the start of each turn on whether the Unit is Grounding or not.
Radius is the same as CapsuleCollider’s collider radius This will be set to UnitStatus, and is refer to by other Scripts that need it. In some circumstances, Grounding will be false even if the Collider touch the ground.
Last Updated in 2. 5
Unit
Action1 – Falling Concept
Unit When there is no Ground below Unit, Falling Parameter will increase beyond 0.0 1.0 if Character simply fall 5.0 if Character Jump, then blend to 1.0 If the Character reached ground, it will turn to 0.0
Last Updated in 2.5
Action1 – Falling Parameter
Additoinal Gravity will increase Falling Speed. If Controllable while Falling is On, Player can control the Unit when falling. AirVelocityControlModifier control the speed of Character while in the Air
AirVelocity
Ground
Last Updated in 2.5
AddGravity
Action1 – Falling Parameter
When Unit start to fall Downward, either from falling or reached the top from Jumping, Depending on how high the Character fall, Landing motion will be different
Last Updated in 2.5
Height is below Fall Height1 => Directly blend to move Height is below Fall Height2 => ReachGround1 Height is below Fall Height3 => ReachGround2 Height is above Fall Height3 => ReachGround3 + Receive Damage
Action1 – Falling Parameter
Inside Function CheckStatePriority(), any state added to here will override Falling motion
Last Updated in 2.5
If the Character is in ReachGround State To GetUp, do GetUp Input. This will be further explain in ReadMePDF_V3_0_08_DamagingControl
Action1.5 – Jumping Concept
Jumping is built-in with in Action Falling. It can only be done when Character is Grounding and CanJump is true Vertical JumpForce determine how high character can jump JumpDelayTimer is used to prevent bug when the Unit was immediately grounded after jump
Vertical Jump Force
Last Updated in 2.5
Action2 – JumpAcross Concept
1
2
3
MatchTarget
Platform
1. The Unit will check if there is any collider within a distance below 2. If there is no floor there, search for any Platform in front 3. If there is a Platform, Calculate MatchTarget 4. If Unit’s Movement Speed is beyond a certain value, Jump there
The Platform GameObject need to have “Platform” tag
Last Updated in 1.5
Action2 – JumpAcross Parameter
FloorSearchOrigin offset from Unit
FloorSearchHeight
SearchRayOriginOffset Offset from Unit
MatchTargetSearchOffset
MatchTarget
If the position of matchtarget’s height relative to Unit is MatchTargetMinHeight < matchTarget < MatchTargetMaxHeight + If the MatchTarget Distance from Unit is horizontally between
FloorSearchOrigin and SearchDistance The unit will do JumpAcross motion toward MatchTarget
SearchDistance
Last Updated in 1.5
Action3 – JumpDown Concept
1. The Unit will check if there is any collider within a distance below 2. If Unit’s Movement Speed is beyond a certain value, Jump Down **CURRENT ISSUE** JumpDown does not goes well with JumpAcross,
1
Last Updated in 1.5
Action3 – JumpDown Parameter
FloorSearchOrigin offset from Unit
FloorSearchHeight
If there is no Collider within distance from SearchOrigin to Height, The Unit will perform JumpDown motion
Last Updated in 1.5
Action4 – MoveUp Concept
2
1
1. The Unit will check if there is any collider in Front 2. If there is a Platform, Calculate MatchTarget 3. If Unit’s Movement Speed is beyond a certain value,
+ MatchTarget’s Height Difference is within a certain range, Do either MoveUp or StepUp Motion base on MatchTargetHeight
The Platform GameObject need to have “Platform” or “Cover” tag
Last Updated in 2.3
Since 2.3, StepUp and MoveUp Action got combined into a single MoveUp Action
Action4 – MoveUp Parameter
SearchRayOriginOffset
MatchTargetSearchOffset
MatchTarget
SearchDistance
If the position of matchtarget’s height relative to Unit is ActionMinHeight < matchTarget < StepUpLimitHeight => Do StepUp StepUpLimitHeight < matchTarget < MoveUpLimitHeight => Do MoveUp Toward MatchTarget **If the Unit is FreeRunning, do RunUp instead of MoveUp **This will also override Action6 – Vaulting
Last Updated in 2.3
Action4 – MoveUp Editing
There has been a request for Jumping Up to reach High Places. You can edit this Script yourself 1. Find the motions that you need, UnityDemo has one available. 2. Inside Action_Base Component, add JUMPHIGH = 8 to ACTION Enum 3. Inside AnimationController linked up that Motion inside Action SubState Machine 4. Link Locomotion to that Action with Condition Action Equals 8 5. Edit Script Accordingly
Last Updated in 2.3
Action6 – Vaulting Concept 2
1
1. The Unit will check if there is any collider in Front 2. If there is a Cover, Calculate MatchTarget 3. If Unit’s Movement Speed is beyond a certain value,
+ MatchTarget’s Height Difference is within a certain range, + Action Input is Made, Do Vaulting Motion
The GameObject need to have “Cover” tag **Name Changed, Called “Crossing” in Version1.0 **Publisher Note To Self, Edit this so that Cover tag is not needed**
Last Updated in 1.5
Action6 – Vaulting Parameter
SearchRayOriginOffset
MatchTargetSearchOffset
MatchTarget
SearchDistance
If the position of matchtarget’s height relative to Unit is ActionMinHeight < matchTarget < ActionMaxHeight The unit will do Vaulting motion toward MatchTarget
Last Updated in 2.3