mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
some collisions don't have surface normals
This commit is contained in:
parent
f4afb983a4
commit
1e600848e7
@ -476,6 +476,10 @@ class SelectionQueue(CollisionHandlerQueue):
|
||||
# If dot product of collision point surface normal and
|
||||
# ray from camera to collision point is positive, we are
|
||||
# looking at the backface of the polygon
|
||||
if not entry.hasFromSurfaceNormal():
|
||||
# Well, no way to tell. Assume we're not backfacing.
|
||||
return 0
|
||||
|
||||
v = Vec3(entry.getFromIntersectionPoint())
|
||||
n = entry.getFromSurfaceNormal()
|
||||
# Convert to camera space for backfacing test
|
||||
|
Loading…
x
Reference in New Issue
Block a user