diff options
| author | Alexander <alex@cogarr.net> | 2020-06-10 20:39:54 -0400 |
|---|---|---|
| committer | Alexander <alex@cogarr.net> | 2020-06-10 20:39:54 -0400 |
| commit | 44a1421c393632978d59c0698a93ae22243b97e9 (patch) | |
| tree | ea5d48412339b0ee6792c01414660639d19cfec6 /src/shared/lua_api/phys/bphysbox.cpp | |
| parent | ececf2c8624f4d95d9413686839f7fa6e5bb5044 (diff) | |
| download | brokengine-44a1421c393632978d59c0698a93ae22243b97e9.tar.gz brokengine-44a1421c393632978d59c0698a93ae22243b97e9.tar.bz2 brokengine-44a1421c393632978d59c0698a93ae22243b97e9.zip | |
Various progress for 1klutz
Added convext shape casts, still a little broken, but it might be
just broken bullet side.
Diffstat (limited to 'src/shared/lua_api/phys/bphysbox.cpp')
| -rw-r--r-- | src/shared/lua_api/phys/bphysbox.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <btBulletDynamicsCommon.h> #include "bphysbox.hpp" +#include "bphysgeneric.hpp" #include <shared/lua_api/common.hpp> 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);// |
