Spline question

Is there a way to do splines in Panda3D? I’m trying to simulate a rope with a weight on it, right now it looks stiff and unrealistic. I need splining so the rope can bend and curve. Thanks.

Look at direct/src/showutil/Rope.py.

Hmm… Could I have an example on how to use it? I’m not really all that sure with new modules; but they are quite helpful!

from direct.directbase.DirectStart import *
from direct.showutil.Rope import Rope

r = Rope()
r.setup(4, [(None, (10, 0, 0)),
            (None, (10, 0, 10)),
            (None, (0, 0, 10)),
            (None, (0, 10, 10)),
            (None, (0, 10, 0)),
            (None, (10, 10, 0))])

If you want to get fancy, you can take advantage of some of the features of the underlying C++ implementation (look in panda/src/parametrics/ropeNode.h for documentation):

from pandac.PandaModules import *
tex = loader.loadTexture('maps/noise.rgb')