TowerDefenseGame/Assets/Scripts/Runtime/AI/PathFinding/PathAgentHandler.cs
Nico ba13eb9e51 Create PlayerJumpHandler to deal with Player's jumping
Create Vfx for multiple jumps while on air
Finalize jumping ability with up to 3 multi-jump implementing a hacky bezier curve
2025-07-23 01:24:54 -07:00

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;
}
}