瀏覽代碼

ray-polygon collision normals?

David Rose 23 年之前
父節點
當前提交
24c69cc00a
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;