aboutsummaryrefslogtreecommitdiff
path: root/src/shared/lua_api/phys/bghostobject.cpp
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2019-06-26 16:14:00 -0400
committerAlexander <alex@cogarr.net>2019-06-26 16:14:00 -0400
commitd5cd0c7b4425e25b11a1ceec154a5c752d508a42 (patch)
treeef50cd7d419bba30ee08f46c97232b1c8c68d2be /src/shared/lua_api/phys/bghostobject.cpp
parent3d60e1432ec43ade4aa61b5a70dd6b8975417e9f (diff)
downloadbrokengine-d5cd0c7b4425e25b11a1ceec154a5c752d508a42.tar.gz
brokengine-d5cd0c7b4425e25b11a1ceec154a5c752d508a42.tar.bz2
brokengine-d5cd0c7b4425e25b11a1ceec154a5c752d508a42.zip
Major refactor of physics code
Move all the physics code into the shared directory, and fix the ghost objects (aabb only)
Diffstat (limited to 'src/shared/lua_api/phys/bghostobject.cpp')
-rw-r--r--src/shared/lua_api/phys/bghostobject.cpp12
1 files changed, 6 insertions, 6 deletions
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);
}