From d5cd0c7b4425e25b11a1ceec154a5c752d508a42 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 26 Jun 2019 16:14:00 -0400 Subject: Major refactor of physics code Move all the physics code into the shared directory, and fix the ghost objects (aabb only) --- src/shared/lua_api/phys/bghostobject.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/shared/lua_api/phys/bghostobject.cpp') diff --git a/src/shared/lua_api/phys/bghostobject.cpp b/src/shared/lua_api/phys/bghostobject.cpp index da9406d..8174b21 100644 --- a/src/shared/lua_api/phys/bghostobject.cpp +++ b/src/shared/lua_api/phys/bghostobject.cpp @@ -59,14 +59,14 @@ void makeghostobject(lua_State* L){ btGhostObject *ghost = new btGhostObject(); ghost->setCollisionShape(shape); ghost->setWorldTransform(transform); - ghost->setCollisionFlags( - btCollisionObject::CollisionFlags::CF_NO_CONTACT_RESPONSE | - btCollisionObject::CollisionFlags::CF_KINEMATIC_OBJECT - ); + //ghost->setCollisionFlags( + //btCollisionObject::CollisionFlags::CF_NO_CONTACT_RESPONSE | + //btCollisionObject::CollisionFlags::CF_KINEMATIC_OBJECT + //); World->addCollisionObject(ghost, btBroadphaseProxy::SensorTrigger, btBroadphaseProxy::AllFilter & ~btBroadphaseProxy::SensorTrigger); //printf("Added rigid body to world: %p\n",World); - Objects.push_back(ghost); + //Objects.push_back(ghost); lua_pushlightuserdata(L,ghost);//ud_ghost } @@ -148,7 +148,7 @@ int bghostoverlapping(lua_State *L){ lua_pushlightuserdata(L,co);//{},{phys},{phys.colliders},i,ud_co lua_gettable(L,-3);//{},{phys},{phys.colliders},i,{collider=ud_co} if(lua_isnil(L,-1)){ - printf("Failed to find collider, failing...\n"); + printf("Failed to find object of collider %p\n", (void*)co); lua_pushstring(L,"Failed to find collider we are overlapping"); lua_error(L); } -- cgit v1.2.3-70-g09d2