Click or drag to resize
RigidBody Class
A rigid body component.
Inheritance Hierarchy

Namespace:  GeonBit.ECS.Components.Physics
Assembly:  GeonBit (in GeonBit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class RigidBody : BasePhysicsComponent

The RigidBody type exposes the following members.

Constructors
  NameDescription
Public methodRigidBody(IBodyShapeInfo, Single, Single, Single)
Create the physical body.
Public methodRigidBody(ICollisionShape, Single, Single, Single)
Create the physical body from shape instance.
Top
Properties
  NameDescription
Public property_GameObject
Get the game object this component is attached to.
(Inherited from BaseComponent.)
Public propertyAngularDamping
Get / set angular damping.
Public propertyAngularFactor
Get / set angular factor.
Public propertyAngularVelocity
Get / set current body angular velocity.
Public propertyBoundingBox
Get the bounding box of the physical body.
Public propertyCollisionGroup
The collision group this body belongs to. Note: compare bits mask.
(Inherited from BasePhysicsComponent.)
Public propertyCollisionMask
With which collision groups this body will collide? Note: compare bits mask.
(Inherited from BasePhysicsComponent.)
Public propertyEnabled
Is this component currently enabled.
(Inherited from BaseComponent.)
Public propertyEnableSimulation
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.)
Public propertyFriction
Get / set body friction.
(Inherited from BasePhysicsComponent.)
Public propertyGravity
Set / get body gravity (if undefined, will use world default).
Public propertyInertia
Get / set body inertia.
Public propertyInvokeCollisionEvents
If true (default) will invoke collision events. You can turn this off for optimizations.
(Inherited from BasePhysicsComponent.)
Public propertyIsEthereal
If ethereal, other bodies will be able to pass through this object, but it will still trigger contact events.
(Inherited from BasePhysicsComponent.)
Public propertyIsKinematic
Return if this is a kinematic object.
(Inherited from BasePhysicsComponent.)
Public propertyIsStatic
Return if this is a static object.
(Inherited from BasePhysicsComponent.)
Public propertyLinearDamping
Get / set linear damping.
Public propertyLinearFactor
Get / set linear factor.
Public propertyLinearVelocity
Get / set current body linear velocity.
Public propertyMass
Get / set body mass.
Public propertyName
Get / set the name of this component.
(Inherited from IComponent.)
Public propertyPosition
Get / set current body position.
(Inherited from BasePhysicsComponent.)
Public propertyRestitution
Get / set body restitution.
(Inherited from BasePhysicsComponent.)
Public propertyScale
Set / get body scale.
(Inherited from BasePhysicsComponent.)
Public propertyWorldTransform
Get / set physical body world transformation.
(Inherited from BasePhysicsComponent.)
Top
Methods
  NameDescription
Public methodApplyForce(Vector3)
Apply force on the physical body, from its center.
Public methodApplyForce(Vector3, Vector3)
Apply force on the physical body, from given position.
Public methodApplyImpulse(Vector3)
Apply force on the physical body, from its center.
Public methodApplyImpulse(Vector3, Vector3)
Apply impulse on the physical body, from given position.
Public methodApplyTorque
Apply torque force on the body.
Public methodCallCollisionEnd
Called when this physical body stop colliding with another body.
(Inherited from BasePhysicsComponent.)
Public methodCallCollisionProcess
Called while this physical body is colliding with another body.
(Inherited from BasePhysicsComponent.)
Public methodCallCollisionStart
Called when this physical body start colliding with another body.
(Inherited from BasePhysicsComponent.)
Public methodClearForces
Clear all forces from the body.
Public methodClearVelocity
Clear velocity from the body.
Public methodClone
Clone this component.
(Overrides BaseComponentClone.)
Public methodCollisionEnd
Called when this physical body stop colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionProcess
Called while this physical body is colliding with another body.
(Inherited from BaseComponent.)
Public methodCollisionStart
Called when this physical body start colliding with another body.
(Inherited from BaseComponent.)
Public methodCopyNodeWorldMatrix
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.
Public methodDestroy
Destroy this component.
(Inherited from BaseComponent.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFixedUpdate
Just like Update(), but called every constant amount of time regardless of FPS and Vsync.
(Inherited from BaseComponent.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImplementedFrameBasedEvents
Get a list of frame-based events this component implements.
(Inherited from BaseComponent.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasMethodImplemented
Return if this component has a method implemented.
(Inherited from BaseComponent.)
Public methodHeartbeat
An event that triggers every X miliseconds (defined per GameObject instance).
(Inherited from BaseComponent.)
Public methodRemoveFromParent
Remove this component from parent.
(Inherited from BaseComponent.)
Public methodSendMessage
Send message to this component.
(Inherited from BaseComponent.)
Public methodSetDamping
Set damping.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update this component (called every frame parent is active).
(Inherited from BaseComponent.)
Top
Fields
  NameDescription
Public fieldAsDebug
If true, it means this component was added to its parent in debug mode.
(Inherited from BaseComponent.)
Public fieldConstAngularVelocity
Optional constant velocity to set for this physical body.
Public fieldConstForce
Optional constant force to set for this physical body.
Public fieldConstTorqueForce
Optional constant angular force to set for this physical body.
Public fieldConstVelocity
Optional constant velocity to set for this physical body.
Top
See Also