Create Vfx for multiple jumps while on air Finalize jumping ability with up to 3 multi-jump implementing a hacky bezier curve
14 lines
430 B
C#
14 lines
430 B
C#
using UnityEngine;
|
|
using UnityEngine.AI;
|
|
|
|
public static class PathAgentHandler {
|
|
public static void UpdatePositionIso(NavMeshAgent agent, Transform transform) {
|
|
if (agent.hasPath) {
|
|
Vector3 desired = agent.desiredVelocity;
|
|
Vector3 corrected = new Vector3(desired.x, desired.y * 0.5f, desired.z);
|
|
transform.position += corrected * Time.deltaTime;
|
|
}
|
|
agent.nextPosition = transform.position;
|
|
}
|
|
}
|