Class CapsuleRigidBody
Represents a Capsule RigidBody behavior for 3D physics.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class CapsuleRigidBody : RigidBodyBehavior3D
Constructors
CapsuleRigidBody(PhysicHandler)
Constructor for creating a CapsuleRigidBody behavior.
Declaration
public CapsuleRigidBody(PhysicHandler handler)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | The physics handler managing this rigid body. |
Methods
CreateRigidBody(float, int, int)
Creates a RigidBody with default capsule dimensions.
Declaration
public override void CreateRigidBody(float mass, int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the capsule. |
int | collisionGroup | |
int | collisionMask |
Overrides
CreateRigidBody(float, float, float, Vec3, int, int)
Creates a RigidBody with a capsule shape.
Declaration
public void CreateRigidBody(float radius, float height, float mass, Vec3 offset = default, int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
float | radius | The radius of the capsule. |
float | height | The height of the capsule. |
float | mass | The mass of the capsule. |
Vec3 | offset | The offset of the capsule. Default is Vec3.Zero(). |
int | collisionGroup | |
int | collisionMask |