Class SphereCollider
Represents a Sphere Collider behavior for 3D physics.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class SphereCollider : ColliderBehavior3D
Constructors
SphereCollider(PhysicHandler)
Initializes a new instance of the SphereCollider class with the specified physics handler.
Declaration
public SphereCollider(PhysicHandler physicHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicHandler | physicHandler | The physics handler to associate with this sphere collider. |
Methods
CreateCollider(Vec3, float, int, int)
Creates a collider with a sphere shape at the specified offset.
Declaration
public void CreateCollider(Vec3 offset, float radius, int collisionGroup = -1, int collisionMask = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| Vec3 | offset | The offset from the parent element's location. |
| float | radius | The radius of the sphere. |
| int | collisionGroup | |
| int | collisionMask |
CreateCollider(int, int)
Creates a collider with a sphere shape using the default radius (half of the parent's size).
Declaration
public override void CreateCollider(int collisionGroup = -1, int collisionMask = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| int | collisionGroup | |
| int | collisionMask |
Overrides
CreateCollider(float, int, int)
Creates a collider with a sphere shape at the origin.
Declaration
public void CreateCollider(float radius, int collisionGroup = -1, int collisionMask = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| float | radius | The radius of the sphere. |
| int | collisionGroup | |
| int | collisionMask |