dotween
dotween copied to clipboard
Managing Dynamic WayPoint Updates in DOPath
I am in the process of implementing movement along a path using the DOPath function. The issue arises when the WayPoint is not initially a fixed value but dynamically changes in real-time. I would appreciate guidance on how to handle this dynamic updating of WayPoints in my implementation.
// How should I handle cases where the values of start.position and end.position are dynamically changing in real-time?
transform.DOPath(new Vector3[] {
start.position,
(start.position + end.position) * 0.5f + Vector3.up * maxHeight ,
end.position },
duration, PathType.CatmullRom, PathMode.Full3D, 10, Colr.red).SetLookAt(0.001f).SetOptions(false).SetEase(Ease.Linear);