Voxel Physics Engine
Models a world of rigid bodies, to be integrated against solid or liquid voxel terrain.
Takes testSolid(x,y,z) function to query block solidity Takes testFluid(x,y,z) function to query if a block is a fluid
testSolid(x,y,z)
testFluid(x,y,z)
The options argument can take the following params:
options
{ airDrag: 0.1, fluidDrag: 0.4, fluidDensity: 2.0, gravity: [0, -10, 0], minBounceImpulse: .5, // lowest collision impulse that bounces} Copy
{ airDrag: 0.1, fluidDrag: 0.4, fluidDensity: 2.0, gravity: [0, -10, 0], minBounceImpulse: .5, // lowest collision impulse that bounces}
Adds a physics body to the simulation
Removes a body, by direct reference
Generated using TypeDoc
Voxel Physics Engine
Models a world of rigid bodies, to be integrated against solid or liquid voxel terrain.
Takes
testSolid(x,y,z)
function to query block solidity TakestestFluid(x,y,z)
function to query if a block is a fluidThe
options
argument can take the following params: