sm.physics.getSphereContacts
Returns a table of the game objects that are found inside the given sphere
Kind: Function
Environments: Game
Game
sm.physics.getSphereContacts( pos, radius, world, mask )
Parameters:
| Name | Type | Description |
|---|---|---|
pos |
Vec3 | The world position of the sphere. |
radius |
number | The radius of the sphere. |
world (optional) |
World | The world to search in. Defaults to current world (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 sphere. { bodies={Body, ..}, characters={Character, ..}, harvestables={Harvestable, ..}, lifts={Lift, ..} } |