mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Made selection compatible with multi windows
This commit is contained in:
parent
d5dc94e763
commit
f3812fd8dd
@ -520,9 +520,9 @@ class SelectionQueue(CollisionHandlerQueue):
|
||||
v = Vec3(entry.getSurfacePoint(fromNodePath))
|
||||
n = entry.getSurfaceNormal(fromNodePath)
|
||||
# Convert to camera space for backfacing test
|
||||
if self.collisionNodePath.getParent() != base.cam:
|
||||
if self.collisionNodePath.getParent() != base.direct.cam:
|
||||
# Problem: assumes base.cam is the camera in question
|
||||
p2cam = self.collisionNodePath.getParent().getMat(base.cam)
|
||||
p2cam = self.collisionNodePath.getParent().getMat(base.direct.cam)
|
||||
v = Vec3(p2cam.xformPoint(v))
|
||||
n = p2cam.xformVec(n)
|
||||
# Normalize and check angle between to vectors
|
||||
@ -582,7 +582,8 @@ class SelectionRay(SelectionQueue):
|
||||
return
|
||||
mx = base.mouseWatcherNode.getMouseX()
|
||||
my = base.mouseWatcherNode.getMouseY()
|
||||
self.collider.setFromLens(base.camNode, mx, my)
|
||||
|
||||
self.collider.setFromLens(base.direct.camNode, mx, my)
|
||||
self.ct.traverse(targetNodePath)
|
||||
self.sortEntries()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user