86
Hello again. I was wondering if it were possible to have a gameobject moving on a DOTween path move relative to its own position instead of world coordinates? If my understanding is correct, is the "Relative" option in the Path Editor only applicable to editing the tween and does not apply to when the tween is actually used?
When I start a tween, the object always pops/teleports to waypoint 1's world coordinates when it begins. Additionally, if a tween is in progress and something happens like a physics force to an object, it will pop back to the waypoint's world position which does not look good. I've tried "Local Movement" but it does not seem to fix this. For instance if I make waypoint 1 be (0, 40, 0), can I make the object just move to y 40 from wherever the gameobject is (treating the gameobject as (0, 0, 0), rather than teleport to (0, 40, 0) when the path is started? If an object's position changes between one waypoint to the next, can it smooth it out and re-plot the next waypoint accordingly instead of popping? I know I can probably just use DOMove for simple movement but Path patterns allow so much more. I apologize if I may not understand very well how it works.
Perhaps a solution can be brute-forced by having the waypoint values offset based on the gameobject's position when the tween is started or when a waypoint is reached, but I have a feeling that there is a built-in or correct way to do this that I have not found. Please advise. Again, thank you very much for your tool.