new RectangularTriggerRegion(size)
Constructs a new rectangular trigger region with the given values.
Parameters:
Name | Type | Description |
---|---|---|
size |
Vector3 | The size of the region. |
Extends
Members
-
size :Vector3
-
The size of the region.
Methods
-
fromJSON(json) → {RectangularTriggerRegion}
-
Restores this instance from the given JSON object.
Parameters:
Name Type Description json
Object The JSON object.
- Overrides:
-
toJSON() → {Object}
-
Transforms this instance into a JSON object.
Returns:
Object -The JSON object.
- Overrides:
-
touching(entity) → {Boolean}
-
Returns true if the bounding volume of the given game entity touches/intersects the trigger region.
Parameters:
Name Type Description entity
GameEntity The entity to test.
Returns:
Boolean -Whether this trigger touches the given game entity or not.
- Overrides:
-
update(trigger) → {RectangularTriggerRegion}
-
Updates this trigger region.
Parameters:
Name Type Description trigger
Trigger The trigger that owns this region.
- Overrides: