lua.box3d.world.body.shape
shape=body:shape(def)
Create a shape in the body.
def contains the values that you can set in a b3ShapeDef and must be a unique table as it will be retained.
All of these are optional so can be nil.
Vectors are a table containing { x , y } values. This may also be a fake table created by lua meta.
Booleans should be true or false
Minor safety issue regarding filter bitmasks since lua(jit) uses doubles these bit masks should only use 52 bits not 64 so the integers can fit safely into a double. When using hex the top 3 nibbles should always be 0 like so 0x000fffffffffffff that is 13 Fs if you are counting.
density
enableContactEvents
enableHitEvents
enablePreSolveEvents
enableSensorEvents
filter
invokeContactCreation
isSensor
material_customColor
material_friction
material_restitution
material_rollingResistance
material_tangentSpeed
material_userMaterialId
updateBodyMass
if def.shape=="circle" then def also contains the values that you can set in a b3Circle
center
radius
if def.shape=="segment" then def also contains the values that you can set in a b3Segment
point1
point2
if def.shape=="capsule" then def also contains the values that you can set in a b3Capsule
center1
center2
radius
if def.shape=="box" then def also contains the values that you can set in a b3Polygon using b3MakeOffsetRoundedBox
halfWidth
halfHeight
center
rotation
radius