sm.areaTrigger.createHull

Creates a new hull area trigger at a given position with a given size.

Kind: Function

Environments: Game

Game

sm.areaTrigger.createHull(
    hull,
    position,
    rotation,
    filter,
    userdata,
    world,
    areaTriggerProxyType
)

Open the full Game reference

If a filter is specified, the trigger area will only be able to detects objects of that certain type. See sm.areaTrigger.filter for more information about filters.

Parameters:

Name Type Description
hull string The path to the hull file.
position Vec3 The world position.
rotation (optional) Quat The world rotation. (Defaults to sm.quat.identity)
filter (optional) integer The object types the area trigger may detect. (See sm.areaTrigger.filter). (Defaults to sm.areaTrigger.filter.all)
userdata (optional) table An optional table of user data
world (optional) World The world to create the area trigger in. (optional)
areaTriggerProxyType (optional) integer The proxy type of the area trigger. (See sm.areaTrigger.areaTriggerProxyType) (Defaults to sm.areaTrigger.areaTriggerProxyType.default)

Returns:

Type Description
AreaTrigger The created area trigger.