JPPathSample

What's the sample about?

Pack: JPAnimation --This sample shows how to use animations callbacks. --Each time the camera reaches a path point, a new animation to reach the next point is triggered. --At the end of the animation definition, a callback handler is set. function JPPathSample.onLookAtNextPoint ( nPoint ) JPAnimation.enterAnimationMode ( ) --Code to move and rotate the camera goes here JPAnimation.leaveAnimationMode ( nil, nil, "onLookAtNextPoint", math.mod ( nPoint + 1, group.getSubObjectCount ( hPath ) ) ) end --As you can see, the same handler is called when the current animation is done, resulting and a new animation for the next target path point.