From 44a1421c393632978d59c0698a93ae22243b97e9 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 10 Jun 2020 20:39:54 -0400 Subject: Various progress for 1klutz Added convext shape casts, still a little broken, but it might be just broken bullet side. --- src/shared/lua_api/phys/bphysbox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/shared/lua_api/phys/bphysbox.cpp') diff --git a/src/shared/lua_api/phys/bphysbox.cpp b/src/shared/lua_api/phys/bphysbox.cpp index 4564c6e..569f3f9 100644 --- a/src/shared/lua_api/phys/bphysbox.cpp +++ b/src/shared/lua_api/phys/bphysbox.cpp @@ -9,6 +9,7 @@ extern "C" { } #include #include "bphysbox.hpp" +#include "bphysgeneric.hpp" #include extern btDiscreteDynamicsWorld* World; @@ -40,7 +41,7 @@ void makenewbphysbox(lua_State* L){ //printf("Got position: (%f,%f,%f)\n",px,py,pz); popvector3d(L,&sx,&sy,&sz);// - btVector3 vshape = btVector3(sx * 0.5f, sy * 0.5f, sz * 0.5f); + btVector3 vshape = btVector3(sx, sy, sz); //printf("Got size: (%f,%f,%f)\n",sx,sy,sz); btVector3 pos = btVector3(px,py,pz); @@ -168,6 +169,7 @@ void bphysbox_register(lua_State* L){// luaL_newmetatable(L, "phys.physbox");//{phys.physbox} lua_newtable(L);//{phys.physbox},{} luaL_register(L,NULL,bphysbox_m);//{phys.physbox},{} + luaL_register(L,NULL,brigidbody_m); lua_setfield(L,-2,"__index");//{phys.physbox} lua_pop(L,1);// -- cgit v1.2.3-70-g09d2