hey… that’s funny enough to make me laugh.
ok, to see the whole thing clearly, try this :
- show() your new collision object
- showCollisions(render) the collision traverser
- create a new task to do these things :
a. put the ray to follow the mouse
b. traverse() the collision traverser
c. print whatever the intonode
something like this :
taskMgr.add(self.followMouse,'mouse chasing')
def followMouse(self,t):
if base.mouseWatcherNode.hasMouse():
mpos=base.mouseWatcherNode.getMouse()
self.pickerRay.setFromLens(base.camNode, mpos.getX(),mpos.getY())
self.picker.traverse(render)
if self.queue.getNumEntries() > 0:
self.queue.sortEntries()
print self.queue.getEntry(0).getIntoNodePath()
return Task.cont