Trigger
/// tip
Trigger is an Actor so it inherits all functions from Actor
///
Constructorโ
Example
local trig = Trigger(
Vector(0, 0, 200),
Rotator(),
Vector(100),
TriggerType.Sphere,
true,
function(self, other) print(other:GetName()) end,
Color(1, 0, 0, 0.5)
)
| Name | Type | Default | Description |
|---|---|---|---|
Location | Vector | (0,0,0) | World position for the trigger |
Rotation | Rotator | (0,0,0) | World rotation |
Extent | Vector | (100,100,100) | Shape extents (radius, box half-size, or capsule radius/height) |
TriggerType | enum | TriggerType.Sphere | Shape of the volume รขโฌโ Sphere, Box, or Capsule |
bVisible | boolean | false | If true, draws a semi-transparent debug shape |
CallbackFunction | function | Required | Function called on actor overlap |
Color | Color | (0,1,0,0.5) | Debug color if visible |
OverlapOnlyClasses | table | {} | Optional array of UClass paths to restrict overlap (e.g. only /Script/Engine.Pawn) |