Difference between Position, Rotation and Scale Intervals and Lerp Intervals?

https://docs.panda3d.org/1.10/python/programming/intervals/lerp-intervals

https://docs.panda3d.org/1.10/python/programming/intervals/position-rotation-and-scale-intervals

The second seems to be called as a method of NodePath or Actor , while Lerp Intervals are their own instances. But why have both? The manual doesn’t really help clarify what advantage the second one has.

My understanding is that the methods described in the latter page are merely convenience methods that generate the intervals described in the former page.

As to the advantage, I daresay that it’s just a matter of not having to fill in as many parameters: since it’s called from a given NodePath, it can infer the relevant parameters (such as starting position), I imagine.

That said, I’m not finding the latter set of methods in the API, so I don’t have confirmation of that offhand. It makes sense to me, at least.

There is no difference. One of those manual pages should be removed.

This is the definition of NodePath.posInterval:

def posInterval(self, *args, **kw):
    from direct.interval import LerpInterval
    return LerpInterval.LerpPosInterval(self, *args, **kw)
1 Like

Sounds like we can simply have a single extra sentence in the Lerp interval manual page that NodePaths and classes which inherit from it have methods which help quickly set up an interval without importing the needed module and creating an interval instance manually. And then delete the position-rotation-and-scale-intervals manual page to avoid confusion.

Yes, I’ve just done exactly that (it’ll take a bit for the online manual to update, though).

2 Likes