From 8bbbba29e54e3f9a7d51d34385d6c0815811758b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sun, 23 Sep 2018 16:09:43 -0400 Subject: Physbox now has more options Used an alternate constructor for physics boxes that gives more control over the phys box --- src/shared/lua_api/phys/bphysbox.cpp | 9 ++++++++- 1 file changed, 8 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 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"); } -- cgit v1.2.3-70-g09d2