Hi,
I have got a two spatials. The first moves. The second one should be controlled by a MotionPath. When the second one reaches a wayPoint it should add the position of the first one to the path. But it there is no new wayPoint when it reaches a wayPoint.
My Code:
public void onWayPointReach(MotionEvent motionControl, int wayPointIndex) {
motionControl.getPath().addWayPoint(target.getWorldTranslation());
}
Now my question:
How can I add a wayPoint to MotionPath when onWayPointReach is called?
Thanks!