I have two black platforms as shown in the image below. The blue part is a bridge. Both the platforms and the bridge are walkable.
The goal is for the red dot on the right-hand side platform to reach the green dot on the left-hand side platform. The red dot’s platform can be moved so that it touches the bridge.
When the scene starts, the red dot walks towards the green dot and stops at the edge of the platform as expected, since it can’t reach it. Problem is that after the red dot has stopped, when I move the platform to approach the bridge, the dot behaves weird and seems to move immediately to go back to the position where the platform used to be or to reach the green dot, sometimes falling off the edge, instead of remaining still and just “following” the platform as it moves.
Is there any way to ask if a target is reachable?
If it’s not reachable, move platform.
Is it reachable now? No, keep on moving platform…
Is it reachable now? Yes, move red dot to green dot.
One last question:
Is there a way to know when the red dot reaches the end of the platform and cannot move further?
I tried using the “endPoint” of the ABPath but not sure how do I know when the “endPoint” is actually the edge of the platform and not some point in between.
I tried overriding “OnTargetReached”, but it only gets triggered when the target is reached, not when an “intermediate” end of the path is reached, as far as I can tell.