sm.physics.getBoxContacts

Returns a table of the game objects that are found inside the given box

Kind: Function

Environments: Game

Game

sm.physics.getBoxContacts( pos, rotation, halfExtents, world, mask )

Open the full Game reference

Parameters:

Name Type Description
pos Vec3 The world position of the box center.
rotation Quat The rotation of the box.
halfExtents Vec3 The half extents of the box.
world World The world to search in. (optional)
mask (optional) integer The collision mask. Defaults to sm.physics.filter.static and sm.physics.filter.dynamicBody and sm.physics.filter.character (Optional)

Returns:

Type Description
table The table with tables of objects found inside the box. { bodies={Body, ..}, characters={Character, ..}, harvestables={Harvestable, ..}, lifts={Lift, ..} }