Scenegraph questions.

What coordinate system does getDistance() work in? Is there a way to get the position of a node in the coordinate system of another unrelated node? Are NodePathCollection 's iterable with [color=blue]for?

(1) in a.getDistance(b), the result is returned in the coordinate space of b. Of course, this value is the same either coordinate space, unless there is a differential scale between a and b.

(2) There are several ways. a.getPos(b) returns the position of a, expressed in the coordinate system of b. Also, b.getRelativePoint(a, Point3(0, 0, 0)) returns the same thing, but you can specify exactly which point of a you’d like expressed in the coordinate system of b.

(3) No, but you can use npc.asList(), e.g.:

for np in render.findAllMatches('**/+CollisionNode').asList():