|
ActionAdventureKit 1.9.3
|
variation on nav mesh movement that uses manual rotation instead of letting the agent steer
it is a compromise between NavMeshAgentMovement where the agent controls both position and rotation
and NavMeshTankMovement which controls rotation itself and does position using root motion
Public Attributes | |
| bool | RotationStop |
| float | RotationSpeed = 10f |
| float | RotationTolerance = 5f |
Public Attributes inherited from AdventureCore.NavMeshAgentMovement | |
| bool | EnableRootMotion |
| bool | EnableRootMotionOutsideMesh |
| bool | EnableRootMotionSuspended |
Public Attributes inherited from AdventureCore.MovementBasePersisted | |
| PersisterBase | Persister |
| float | Interval = 1f |
| Transform | CameraPivot |
| UnityEvent | Persisted |
Protected Member Functions | |
| override void | Awake () |
| override void | updateMovement () |
| override void | checkFinished () |
Protected Member Functions inherited from AdventureCore.NavMeshAgentMovement | |
| override void | Update () |
| override void | OnDrawGizmosSelected () |
| virtual void | startApproach (Transform transform, Vector3? position, Action finished, float distance, float speed, Vector3 destination) |
| virtual void | onApproachFinished () |
| virtual bool | rotateToTarget (float speed, float tolerance) |
Protected Member Functions inherited from AdventureCore.MovementBasePersisted | |
| override void | doInitialize () |
Protected Member Functions inherited from AdventureCore.MovementBase | |
| virtual IEnumerator | moveCharacter (Vector3 position, Quaternion rotation, bool unscaled=false) |
| virtual IEnumerator | align (float target, Action finished=null, bool waitForEndOfFrame=false) |
| virtual void | keepAligned (float rotation) |
Additional Inherited Members | |
Public Member Functions inherited from AdventureCore.NavMeshAgentMovement | |
| virtual void | StartApproach (Action finished, float distance, float speed) |
| virtual void | StartApproach (Transform destination, Action finished, float distance, float speed) |
| virtual void | StartApproach (Vector3 destination, Action finished, float distance, float speed) |
| virtual void | StopApproach () |
| override void | PropelCharacter (Vector3 value) |
| override void | ApplyRootMotion (Animator animator) |
Public Member Functions inherited from AdventureCore.MovementBasePersisted | |
| void | Set () |
| void | Set (Vector3 position, Quaternion rotation, Quaternion cameraRotation) |
| override void | SetPersisted (Vector3 position, Quaternion rotation) |
Public Member Functions inherited from AdventureCore.MovementBase | |
| virtual Quaternion | GetOffsetRotation (float horizontal, float vertical) |
| void | Initialize () |
| virtual void | SetTarget (Component component) |
| virtual void | SetTarget (Transform transform) |
| virtual void | ResetInput () |
| resets current input to the model direction(for example when coming out of an animation) | |
| virtual void | ResetMomentum () |
| resets the movements momentum(gravity, velocity) | |
| virtual void | Align (Vector3 direction) |
| quickly aligns the movement with a give direction | |
| virtual void | AlignToInput () |
| quickly aligns the movement with the input direction(in between rolls for example) | |
| virtual void | AlignToTarget () |
| quickly aligns the movement with its Target, this may be a locked on enemy or the target an AI is following | |
| virtual void | KeepAligned (Vector3 direction) |
| keeps the movement aligned with a give direction | |
| virtual void | KeepAlignedToInput () |
| keeps the movement aligned with the input direction | |
| virtual void | KeepAlignedToTarget () |
| keeps the movement aligned with its Target, this may be a locked on enemy or the target an AI is following | |
| virtual void | StartMarch () |
| virtual bool | AdvanceMarch (Vector3 a, Vector3 b, float normalizedTime, float deltaTime, float multiplier=1f) |
| virtual bool | AdvanceMarch (Vector3 target, float deltaTime, float multiplier=1f) |
| virtual void | EndMarch () |
| virtual void | TeleportCharacter (Transform transform) |
| instantly moves the character to a transform | |
| virtual void | TeleportCharacter (Vector3 position, Quaternion rotation) |
| instantly moves the character | |
| virtual void | MoveCharacter (Transform transform) |
| quickly moves the movement to the passed transform | |
| virtual void | MoveCharacter (Vector3 position, Quaternion rotation) |
| virtual void | MoveCharacter (Transform transform, bool unscaled) |
| quickly moves the movement to the passed transform | |
| virtual void | MoveCharacter (Vector3 position, Quaternion rotation, bool unscaled) |
| virtual void | PropelCharacterLocal (Vector3 value) |
| void | SetPersisted (Transform transform) |
Static Public Attributes inherited from AdventureCore.MovementBasePersisted | |
| const string | PERSISTENCE_SUB_KEY = "MOV" |
Static Protected Member Functions inherited from AdventureCore.MovementBase | |
| static IEnumerator | tween (Action< float > change, Action finished, float duration, bool waitForEndOfFrame=false, bool unscaled=false) |
Protected Attributes inherited from AdventureCore.NavMeshAgentMovement | |
| NavMeshAgent | _agent |
| Vector3 | _previousPosition |
| Quaternion | _previousRotation |
| bool | _isRotating |
| bool | _isApproaching |
| bool | _isApproachStarting |
| Transform | _destinationTransform |
| Vector3? | _destinationPosition |
| float | _destinationSpeed |
| float | _speed |
| float | _angularSpeed |
| Action | _approachFinished |
Properties inherited from AdventureCore.NavMeshAgentMovement | |
| override bool | IsTranslationSuspended [get, set] |
| override float | SpeedMultiplier [get, set] |
| override Vector3 | Velocity [get] |
| override bool | IsRotated [get] |
| override bool | IsRotating [get] |
| override bool | _isPersistenceActive [get] |
Properties inherited from AdventureCore.MovementBasePersisted | |
| virtual bool | _isPersistenceActive [get] |
Properties inherited from AdventureCore.MovementBase | |
| virtual bool | IsInitialized [get] |
| virtual bool | IsTranslationSuspended [get, set] |
| means that no translation should be applied by the movement | |
| virtual bool | IsTranslationSuspendedApplyPhysics [get, set] |
| whether to still apply physics when translation is suspended | |
| virtual bool | IsRotationSuspended [get, set] |
| means that no rotation should be applied by the movement | |
| virtual bool | IsControlSuspended [get, set] |
| while this is true input will have no influence on the movement(when rolling or staggered for example) | |
| virtual bool | IsControlSuspendedKeepMoving [get, set] |
| whether the character should continue the movement it had when control was suspened | |
| virtual bool | IsCollisionSuspended [get, set] |
| suspends collision of the player with environment and such, for example when the player is moved through a tight crack by an animation or climbing a ladder | |
| virtual bool | IsPersistenceSuspended [get, set] |
| notifies the movement that its position should not be persisted(perhaps because the area is unsafe or moving) | |
| virtual float | SpeedMultiplier = 1f [get, set] |
| can be used to modify the movements speed from outside(for example slowed by snow or boosted by some effect) | |
| virtual Vector3 | MotionMultiplier = Vector3.one [get, set] |
| can be used to modify the movement from root motion from outside(may be useful when characters of different sizes use the same animation) | |
| virtual float | SpeedMinimum [get, set] |
| can be used to force the character to move forward at least by this speed for example when rolling, 0 by default, usually set as a factor 0-1 | |
| virtual float | SpeedMaximum = float.MaxValue [get, set] |
| can be used to limit the maximum speed to slow the character down or prevent them from sprinting different way of slowing character down from a multiplier, usually set as a factor of 0-1(-2 for sprinting) | |
| virtual float | SpeedFactorForward [get, protected set] |
| how fast the character is moving forwards relative to its maximum speed so 1 means full speed forward -0.5 is moving back at half speed and 2 could be a sprint forward can be used as a parameter for walking animations and leaning according to speed | |
| virtual float | SpeedFactorSideways [get, protected set] |
| how fast the character is moving sideways relative to its maximum speed characters may move sideways when locked on for example 1 could mean full speed right, -0.5 half speed left can be used as a parameter for walking animations and leaning according to speed | |
| virtual bool | IsGrounded = true [get, protected set] |
| whether the character is currently touching the ground useful for switching to a falling animation or to check if jumping is possible | |
| virtual bool | IsSprinting [get, protected set] |
| whether the character is currently sprinting | |
| virtual bool | IsMarching [get, protected set] |
| whether the character is currently marching | |
| virtual bool | IsMoved [get, protected set] |
| whether the character is currently being forced to move using MoveCharacter(Transform) | |
| virtual Transform | Target [get] |
| virtual bool | HasTarget [get] |
| virtual float | TargetDistance [get] |
| virtual Vector3 | TargetDirection [get] |
| virtual Vector3 | Position [get, set] |
| virtual Quaternion | Rotation [get, set] |
| virtual Vector3 | Forward [get, set] |
| virtual Vector3 | Right [get, set] |
| virtual Vector3 | Up [get, set] |
| virtual Vector3 | Direction [get] |
| current movement direction (used for example by hero climb to check if character is moveing towards wall) | |
| virtual Vector3 | Velocity [get] |
| current movement velocity | |
| virtual bool | IsMoving [get] |
| movement is currently changing position | |
| virtual bool | IsRotating [get] |
| rotation of the movement is currently changing | |
| virtual bool | IsRotated [get] |
| rotation is set by lock-on or rotation input(twin stick) instead of being determined by movement direction | |
| virtual Transform | RotationPivot [get] |
| virtual float | AlignmentDuration [get] |
Events inherited from AdventureCore.MovementBase | |
| Action< Transform > | TargetChanged |
|
inlineprotectedvirtual |
Reimplemented from AdventureCore.NavMeshAgentMovement.
|
inlineprotectedvirtual |
Reimplemented from AdventureCore.NavMeshAgentMovement.
|
inlineprotectedvirtual |
Reimplemented from AdventureCore.NavMeshAgentMovement.