Class BoxRigidBody
Represents a 2D box rigid body behavior for game elements.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics2D
Assembly: Genesis.dll
Syntax
public class BoxRigidBody : RigidBodyBehavior2D
Constructors
BoxRigidBody(PhysicHandler)
Initializes a new instance of the BoxRigidBody class with the specified physics handler.
Declaration
public BoxRigidBody(PhysicHandler handler)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | The physics handler. |
Properties
AngularFactor
Gets or sets the angular factor for the rigid body.
Declaration
public Vec3 AngularFactor { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
LinearFactor
Gets or sets the linear factor for the rigid body.
Declaration
public Vec3 LinearFactor { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
Methods
CreateRigidBody(float, Vec3, int, int)
Creates the rigid body with the specified mass and half extents.
Declaration
public void CreateRigidBody(float mass, Vec3 halfextends, int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the rigid body. |
Vec3 | halfextends | The half extents of the box shape. |
int | collisionGroup | |
int | collisionMask |
CreateRigidBody(float, int, int)
Creates the rigid body with the specified mass.
Declaration
public override void CreateRigidBody(float mass, int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the rigid body. |
int | collisionGroup | |
int | collisionMask |