lua.wetgenes.bullet.body.cgroup
body:cgroup(bits)
bits=body:cgroup()
Set or get body cgroup bits. You have 31 bits, so use 0x7fffffff to set all. These provide simple yes/no collision control between bodies.
cgroup bits are all the groups this body belongs to.
cmask bits are all the groups this body colides with.
lua.wetgenes.bullet.body.change_shape
body:change_shape(shape)
body:change_shape(shape,mass)
Change the shape assoctiated with this body and optionally change the mass.
lua.wetgenes.bullet.body.cmask
body:cmask(bits)
bits=body:cmask()
body:cmask(0x7fffffff)
Set or get body cmask bits. You have 31 bits, so use 0x7fffffff to set all. This body will only colide with another body if the other bodys cgroup has a bit set that is also set in our cmask.
cgroup bits are all the groups this body belongs to.
cmask bits are all the groups this body colides with.
lua.wetgenes.bullet.body.force
body:force(fx,fy,fz)
body:force(fx,fy,fz,lx,ly,lz)
Apply force fx,fy,fz at world relative location (subtract origin of object) lx,ly,lz which will default to 0,0,0 if not given.
lua.wetgenes.bullet.body.gravity
body:gravity(x,y,z)
x,y,z = body:gravity()
Set or get body gravity vector. Fidling with this may be the easiest way for a player to move an object around, it certainly makes it easier to create "magnetic fields" to hover objects above the ground.
lua.wetgenes.bullet.body.impulse
body:impulse(fx,fy,fz)
body:impulse(fx,fy,fz,lx,ly,lz)
Apply impulse fx,fy,fz at world relative location (subtract origin of object) lx,ly,lz which will default to 0,0,0 if not given.
lua.wetgenes.bullet.body.overlaps
body:overlaps()
Get list of bodys that overlap with a ghost body object.
lua.wetgenes.bullet.body.support
x,y,z=body:support(nx,ny,nz)
Get world location of support point in given direction.
EG the world location that is touching the floor when the direction is up.