Class CapsuleCollider
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics3D
Assembly: Genesis.dll
Syntax
public class CapsuleCollider : PhysicsBehavior
Constructors
CapsuleCollider()
Declaration
public CapsuleCollider()
Properties
Offset
Declaration
public Vec3 Offset { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
RigidBody
Declaration
public RigidBody RigidBody { get; set; }
Property Value
Type | Description |
---|---|
RigidBody |
Methods
CreateRigidBody(PhysicHandler, Vec3, float, float, float)
Declaration
public void CreateRigidBody(PhysicHandler handler, Vec3 offset, float radius, float height, float mass)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | |
Vec3 | offset | |
float | radius | |
float | height | |
float | mass |
CreateRigidBody(PhysicHandler, float, float, float)
Declaration
public void CreateRigidBody(PhysicHandler handler, float radius, float height, float mass)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | handler | |
float | radius | |
float | height | |
float | mass |
GetPhysicsObject()
Gets the physics object associated with this behavior.
Declaration
public override object GetPhysicsObject()
Returns
Type | Description |
---|---|
object | The physics object |
Overrides
GetPhysicsObject<T>()
Gets the physics object associated with this behavior, cast to type T.
Declaration
public override T GetPhysicsObject<T>()
Returns
Type | Description |
---|---|
T | The physics object cast to type T |
Type Parameters
Name | Description |
---|---|
T | Type to cast the physics object to |
Overrides
OnDestroy(Game, GameElement)
Called when the game behavior is being destroyed.
Declaration
public override void OnDestroy(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnInit(Game, GameElement)
Called when the game behavior is initialized.
Declaration
public override void OnInit(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnRender(Game, GameElement)
Called when the game behavior is rendered.
Declaration
public override void OnRender(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |
Overrides
OnUpdate(Game, GameElement)
Called when the game behavior is updated.
Declaration
public override void OnUpdate(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |