# sm.areaTrigger.createCylinder

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

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.areaTrigger.createCylinder(
    radius,
    halfLength,
    position,
    rotation?,
    filter?,
    userdata?,
    world?,
    areaTriggerProxyType?
)
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#createcylinder)

If a filter is specified, the trigger area will only be able to detects objects of that certain type. See [sm.areaTrigger.filter](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#filter) for more information about filters.

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `radius` | number | The radius of the cylinder. |
| `halfLength` | number | The lengthwise extent of the cylinder (i.e. half the length of the cylinder). |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The world position. |
| `rotation` *(optional)* | [Quat](../Game-Script-Environment/Userdata/Quat.md) | The world rotation. (Defaults to [sm.quat.identity](../Game-Script-Environment/Static-Functions/sm.quat.md#identity)) |
| `filter` *(optional)* | integer | The object types the area trigger may detect. (See [sm.areaTrigger.filter](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#filter)). (Defaults to sm.areaTrigger.filter.all) |
| `userdata` *(optional)* | table | An optional table of user data |
| `world` *(optional)* | [World](../Game-Script-Environment/Userdata/World.md) | The world to create the area trigger in. (optional) |
| `areaTriggerProxyType` *(optional)* | integer | The proxy type of the area trigger. (See [sm.areaTrigger.areaTriggerProxyType](../Game-Script-Environment/Static-Functions/sm.areaTrigger.md#areatriggerproxytype)) (Defaults to sm.areaTrigger.areaTriggerProxyType.default) |

**Returns:**

| Type | Description |
| --- | --- |
| [AreaTrigger](../Game-Script-Environment/Userdata/AreaTrigger.md) | The created area trigger. |
