diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-09-23 16:09:43 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-09-23 16:09:43 -0400 |
| commit | 8bbbba29e54e3f9a7d51d34385d6c0815811758b (patch) | |
| tree | 0db6bb138a1b64ff3bb884efa064da6171b00c60 /src/shared/lua_api/phys | |
| parent | 2aa18a785dc77fec53513895f5e3361c37401fe2 (diff) | |
| download | brokengine-8bbbba29e54e3f9a7d51d34385d6c0815811758b.tar.gz brokengine-8bbbba29e54e3f9a7d51d34385d6c0815811758b.tar.bz2 brokengine-8bbbba29e54e3f9a7d51d34385d6c0815811758b.zip | |
Physbox now has more options
Used an alternate constructor for physics boxes that gives more
control over the phys box
Diffstat (limited to 'src/shared/lua_api/phys')
| -rw-r--r-- | src/shared/lua_api/phys/bphysbox.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/shared/lua_api/phys/bphysbox.cpp b/src/shared/lua_api/phys/bphysbox.cpp index 728b6d1..94b025e 100644 --- a/src/shared/lua_api/phys/bphysbox.cpp +++ b/src/shared/lua_api/phys/bphysbox.cpp @@ -65,7 +65,14 @@ void makenewbphysbox(lua_State* L){ shape->calculateLocalInertia(mass, localinertia); // Create the rigid body object - btRigidBody* rigidbody = new btRigidBody(mass, motionstate, shape, localinertia); + btRigidBody::btRigidBodyConstructionInfo cinfo = btRigidBody::btRigidBodyConstructionInfo( + mass, + motionstate, + shape, + localinertia + ); + //cinfo.m_friction = 0; + btRigidBody *rigidbody = new btRigidBody(cinfo); if(!rigidbody){ //printf("No rigidbody\n"); } |
