| RigidBody Class |
Namespace: GeonBit.ECS.Components.Physics
public class RigidBody : BasePhysicsComponent
The RigidBody type exposes the following members.
| Name | Description | |
|---|---|---|
| RigidBody(IBodyShapeInfo, Single, Single, Single) |
Create the physical body.
| |
| RigidBody(ICollisionShape, Single, Single, Single) |
Create the physical body from shape instance.
|
| Name | Description | |
|---|---|---|
| _GameObject |
Get the game object this component is attached to.
(Inherited from BaseComponent.) | |
| AngularDamping |
Get / set angular damping.
| |
| AngularFactor |
Get / set angular factor.
| |
| AngularVelocity |
Get / set current body angular velocity.
| |
| BoundingBox |
Get the bounding box of the physical body.
| |
| CollisionGroup |
The collision group this body belongs to.
Note: compare bits mask.
(Inherited from BasePhysicsComponent.) | |
| CollisionMask |
With which collision groups this body will collide?
Note: compare bits mask.
(Inherited from BasePhysicsComponent.) | |
| Enabled |
Is this component currently enabled.
(Inherited from BaseComponent.) | |
| EnableSimulation |
Get / set simulation state.
If true, will simulate forces etc on this body (default).
If false, will not simulate forces and basically behave like a kinematic body.
(Inherited from BasePhysicsComponent.) | |
| Friction |
Get / set body friction.
(Inherited from BasePhysicsComponent.) | |
| Gravity |
Set / get body gravity (if undefined, will use world default).
| |
| Inertia |
Get / set body inertia.
| |
| InvokeCollisionEvents |
If true (default) will invoke collision events.
You can turn this off for optimizations.
(Inherited from BasePhysicsComponent.) | |
| IsEthereal |
If ethereal, other bodies will be able to pass through this object, but it will still trigger contact events.
(Inherited from BasePhysicsComponent.) | |
| IsKinematic |
Return if this is a kinematic object.
(Inherited from BasePhysicsComponent.) | |
| IsStatic |
Return if this is a static object.
(Inherited from BasePhysicsComponent.) | |
| LinearDamping |
Get / set linear damping.
| |
| LinearFactor |
Get / set linear factor.
| |
| LinearVelocity |
Get / set current body linear velocity.
| |
| Mass |
Get / set body mass.
| |
| Name |
Get / set the name of this component.
(Inherited from IComponent.) | |
| Position |
Get / set current body position.
(Inherited from BasePhysicsComponent.) | |
| Restitution |
Get / set body restitution.
(Inherited from BasePhysicsComponent.) | |
| Scale |
Set / get body scale.
(Inherited from BasePhysicsComponent.) | |
| WorldTransform |
Get / set physical body world transformation.
(Inherited from BasePhysicsComponent.) |
| Name | Description | |
|---|---|---|
| ApplyForce(Vector3) |
Apply force on the physical body, from its center.
| |
| ApplyForce(Vector3, Vector3) |
Apply force on the physical body, from given position.
| |
| ApplyImpulse(Vector3) |
Apply force on the physical body, from its center.
| |
| ApplyImpulse(Vector3, Vector3) |
Apply impulse on the physical body, from given position.
| |
| ApplyTorque |
Apply torque force on the body.
| |
| CallCollisionEnd |
Called when this physical body stop colliding with another body.
(Inherited from BasePhysicsComponent.) | |
| CallCollisionProcess |
Called while this physical body is colliding with another body.
(Inherited from BasePhysicsComponent.) | |
| CallCollisionStart |
Called when this physical body start colliding with another body.
(Inherited from BasePhysicsComponent.) | |
| ClearForces |
Clear all forces from the body.
| |
| ClearVelocity |
Clear velocity from the body.
| |
| Clone |
Clone this component.
(Overrides BaseComponentClone.) | |
| CollisionEnd |
Called when this physical body stop colliding with another body.
(Inherited from BaseComponent.) | |
| CollisionProcess |
Called while this physical body is colliding with another body.
(Inherited from BaseComponent.) | |
| CollisionStart |
Called when this physical body start colliding with another body.
(Inherited from BaseComponent.) | |
| CopyNodeWorldMatrix |
Force the scene node to calculate world transformations and copy them into the rigid body transformations.
This will make the scene node world transform override the current physical body state.
| |
| Destroy |
Destroy this component.
(Inherited from BaseComponent.) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| FixedUpdate |
Just like Update(), but called every constant amount of time regardless of FPS and Vsync.
(Inherited from BaseComponent.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetImplementedFrameBasedEvents |
Get a list of frame-based events this component implements.
(Inherited from BaseComponent.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| HasMethodImplemented |
Return if this component has a method implemented.
(Inherited from BaseComponent.) | |
| Heartbeat |
An event that triggers every X miliseconds (defined per GameObject instance).
(Inherited from BaseComponent.) | |
| RemoveFromParent |
Remove this component from parent.
(Inherited from BaseComponent.) | |
| SendMessage |
Send message to this component.
(Inherited from BaseComponent.) | |
| SetDamping |
Set damping.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| Update |
Update this component (called every frame parent is active).
(Inherited from BaseComponent.) |
| Name | Description | |
|---|---|---|
| AsDebug |
If true, it means this component was added to its parent in debug mode.
(Inherited from BaseComponent.) | |
| ConstAngularVelocity |
Optional constant velocity to set for this physical body.
| |
| ConstForce |
Optional constant force to set for this physical body.
| |
| ConstTorqueForce |
Optional constant angular force to set for this physical body.
| |
| ConstVelocity |
Optional constant velocity to set for this physical body.
|