LVecBase3f a = LVecBase3f(100, 100, 100);
LVecBase3f b = LVecBase3f(-100, 100, 100);
LVecBase3f c = LVecBase3f(-100, -100, 100);
LVecBase3f d = LVecBase3f(100, -100, 100);
PT(CollisionPolygon) map_quad = new CollisionPolygon(a,b,c,d);
PT(CollisionNode) map_CNode = new CollisionNode("mapColl");
map_CNode->add_solid(map_quad);
map_NP.attach_new_node(map_CNode);
c_trav.add_collider(map_NP, pick_handler);
I tried to make a CollisionPolygon with the 4 points above for my picking. It builds fine but when i run the application, i get an asserton error on the line map_CNode->add_solid(map_quad);
I used somewhat the same code to create other collision solids such as spheres which worked fine (replace new CollisionPolygon() with CollisionSphere()). But it just isn’t working for CollisionPolygon.