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)
Creates the rigid body with the specified mass.
Declaration
public override void CreateRigidBody(float mass)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the rigid body. |
Overrides
CreateRigidBody(float, Vec3)
Creates the rigid body with the specified mass and half extents.
Declaration
public void CreateRigidBody(float mass, Vec3 halfextends)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the rigid body. |
Vec3 | halfextends | The half extents of the box shape. |