Class BoxTrigger2D
Represents a 2D box trigger for physics interactions.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics2D
Assembly: Genesis.dll
Syntax
public class BoxTrigger2D : TriggerBehavior2D
Remarks
Provides functionality to create and manage a box-shaped trigger for detecting collisions in a 2D physics world.
Constructors
BoxTrigger2D(PhysicHandler)
Initializes a new instance of the BoxTrigger2D class with the specified physics handler.
Declaration
public BoxTrigger2D(PhysicHandler handler)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicHandler | handler | The physics handler to associate with this box trigger. |
Methods
CreateTrigger(Vec3, int, int)
Creates the trigger with the specified half extents.
Declaration
public void CreateTrigger(Vec3 halfExtends, int collisionGroup = -1, int collisionMask = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| Vec3 | halfExtends | The half extents of the box trigger. |
| int | collisionGroup | |
| int | collisionMask |
CreateTrigger(int, int)
Creates the trigger using the parent's size half extents.
Declaration
public override void CreateTrigger(int collisionGroup = -1, int collisionMask = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| int | collisionGroup | |
| int | collisionMask |