Best way to handle camera with path and track control?

Hi guys,



My question is about to inverse the direction of the track of the camera. When I create a path and track it down using MotionTrack it´s follows the path to left side, how to inverse the side to the right side?



The only way I found to do this is inverting the order of the waypoint be added. For example:



Paths follows left side:



path.addWayPoint(new Vector3f(8 + pathLocation, 5, 0 + pathLocation));

path.addWayPoint(new Vector3f(0 + pathLocation, 5, 8 + pathLocation));

path.addWayPoint(new Vector3f(-8 + pathLocation, 5, 0 + pathLocation));

path.addWayPoint(new Vector3f(0 + pathLocation, 5, -8 + pathLocation));



Path follows right side:



path.addWayPoint(new Vector3f(0 + pathLocation, 5, -8 + pathLocation));

path.addWayPoint(new Vector3f(-8 + pathLocation, 5, 0 + pathLocation));

path.addWayPoint(new Vector3f(0 + pathLocation, 5, 8 + pathLocation));

path.addWayPoint(new Vector3f(8 + pathLocation, 5, 0 + pathLocation));



I´m trying to handle this to control the camera´s moves by key triggers. For example: when A key is pressed, the camera moves from waypoint 1 to waypoint 2, otherwise B key is pressed, the camera moves from waypoint 1 to waypoint 4, opposite side.



Any clue will be very welcome, thanks in advance.

I never tried it, but did you try to set the speed of the motion track to -1?

No, I´ve never tried this approach. Good tip, nehon, negative values can be opposite side. I will do it when back home.