Trigger | CraytaKit
Skip to main content

Trigger

Functions

Function NameReturn TypeDescriptionTags
IsOverlapping(Entity entity)booleanReturns whether a passed in entity is currently within the triggerNone
IsInside(Vector position)booleanReturns whether the point given (world space) is within the bounds of the trigger (whether the trigger is active or not)None

Properties

Property NameReturn TypeDescriptionTags
playersOnlybooleanSet whether the trigger should only overlap players or all entitiesRead-Write
sizeVectorThe size of the trigger boxRead-Write
activebooleanThe trigger box is activeRead-Write
interactablebooleanThe trigger box is interactableRead-Write
onTriggerEnterEventCalled when this trigger volume is entered by a valid entity, with the Entity passed as an argument, as well as the trigger Entity from which the onTriggerEnter event is sent. An alternative to listening for OnTriggerEnter in a script on the entityRead
onTriggerExitEventCalled when this trigger volume is exited by a valid entity, with the Entity passed as an argument, as well as the trigger Entity from which the onTriggerExit event is sent. An alternative to listening for OnTriggerExit in a script on the entityRead

Examples

© 2021 CraytaKit