mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Rope.getPoints returns points correctly spaced for curves whose knot values are outside of the range 0 to 1
This commit is contained in:
parent
5dfa504370
commit
07e9aa1811
@ -131,10 +131,13 @@ class Rope(NodePath):
|
||||
Rope itself."""
|
||||
|
||||
result = self.curve.evaluate(self)
|
||||
startT = result.getStartT()
|
||||
sizeT = result.getEndT() - startT
|
||||
|
||||
numPts = len
|
||||
ropePts = []
|
||||
for i in range(numPts):
|
||||
pt = Point3()
|
||||
result.evalPoint(i / float(numPts - 1), pt)
|
||||
result.evalPoint(sizeT * i / float(numPts - 1) + startT, pt)
|
||||
ropePts.append(pt)
|
||||
return ropePts
|
||||
|
Loading…
x
Reference in New Issue
Block a user