Browse Source

ray-polygon collision normals?

David Rose 23 years ago
parent
commit
24c69cc00a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      panda/src/collide/collisionPolygon.cxx

+ 2 - 0
panda/src/collide/collisionPolygon.cxx

@@ -424,6 +424,7 @@ test_intersection_from_ray(CollisionHandler *record,
   PT(CollisionEntry) new_entry = new CollisionEntry(entry);
 
   new_entry->set_into_intersection_point(plane_point);
+  new_entry->set_into_surface_normal(get_normal());
 
   record->add_entry(new_entry);
   return 1;
@@ -474,6 +475,7 @@ test_intersection_from_segment(CollisionHandler *record,
   PT(CollisionEntry) new_entry = new CollisionEntry(entry);
 
   new_entry->set_into_intersection_point(plane_point);
+  new_entry->set_into_surface_normal(get_normal());
 
   record->add_entry(new_entry);
   return 1;