Carousel(intervals) Tutorial

This tutorial will demonstrate some uses for intervals in panda to move objects in your panda world. We have already shown intervals in the Solar System Tutorial but now the subject is the primary focus of this toturial. Thus, the code that has already been gone over in the solar system tutorial will not be reiterated in this tutorial.

Intervals are built in Panda3D functions that will let you change an attribute over time. In this tutorial, the position and texture attributes of various objects will be altered over time to give life to a carousel. The most common intervals for doing simple movement of objects are the posInterval and hprInterval. These intervals will change the position/orientation of an object (or node) over a given time and given displacement/rotation, respectively. Another interval we will look at is the LerpFunc interval. LerpFunc will call a function and give it a linearly interpolated value range over a specified time range. This is how we will oscilate pandas via a sin wave and alternate textures over time. For more information on intervals, please refer to the intervals section of the online manual.