RigidbodyComponent Class
Namespace: Stride.PhysicsAssembly: Stride.Physics.dll
[DataContract("RigidbodyComponent")]
[Display("Rigidbody", null)]
public sealed class RigidbodyComponent : PhysicsSkinnedComponentBase, IIdentifiable
Name | Description | |
---|---|---|
Constructors | ||
RigidbodyComponent() | ||
Properties | ||
AngularDamping | Gets or sets the angular damping of this rigidbody |
|
AngularFactor | Gets or sets the angular factor. |
|
AngularVelocity | Gets or sets the angular velocity. |
|
ColliderShape | Gets the collider shape. |
|
Gravity | Gets or sets the gravity acceleration applied to this RigidBody |
|
IsKinematic | Gets or sets the kinematic property |
|
LinearDamping | Gets or sets the linear damping of this rigidbody |
|
LinearFactor | Gets or sets the linear factor. |
|
LinearVelocity | Gets or sets the linear velocity. |
|
LinkedConstraints | Gets the linked constraints. |
|
Mass | Gets or sets the mass of this Rigidbody |
|
OverrideGravity | Gets or sets if this Rigidbody overrides world gravity |
|
RigidBodyType | Gets or sets the type. |
|
TotalForce | Gets the total force. |
|
TotalTorque | Gets the total torque. |
|
Methods | ||
ApplyForce(Vector3) | Applies the force. |
|
ApplyForce(Vector3, Vector3) | Applies the force. |
|
ApplyImpulse(Vector3) | Applies the impulse. |
|
ApplyImpulse(Vector3, Vector3) | Applies the impulse. |
|
ApplyTorque(Vector3) | Applies the torque. |
|
ApplyTorqueImpulse(Vector3) | Applies the torque impulse. |
|
ClearForces() | Clears all forces being applied to this rigidbody |
|
OnAttach() | ||
OnDetach() | ||
OnUpdateDraw() |
Constructors
RigidbodyComponent()
public RigidbodyComponent()
Properties
AngularDamping
Gets or sets the angular damping of this rigidbody
[DataMember(90)]
public float AngularDamping { get; set; }
Property Value
Type | Description |
---|---|
System.Single | true, false |
AngularFactor
Gets or sets the angular factor.
public Vector3 AngularFactor { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The angular factor. |
AngularVelocity
Gets or sets the angular velocity.
public Vector3 AngularVelocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The angular velocity. |
ColliderShape
Gets the collider shape.
public override ColliderShape ColliderShape { get; set; }
Property Value
Type | Description |
---|---|
ColliderShape | The collider shape |
Overrides
Gravity
Gets or sets the gravity acceleration applied to this RigidBody
[DataMember(100)]
public Vector3 Gravity { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | A vector representing moment and direction |
IsKinematic
Gets or sets the kinematic property
[DataMember(75)]
public bool IsKinematic { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true, false |
LinearDamping
Gets or sets the linear damping of this rigidbody
[DataMember(85)]
public float LinearDamping { get; set; }
Property Value
Type | Description |
---|---|
System.Single | true, false |
LinearFactor
Gets or sets the linear factor.
public Vector3 LinearFactor { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The linear factor. |
LinearVelocity
Gets or sets the linear velocity.
public Vector3 LinearVelocity { get; set; }
Property Value
Type | Description |
---|---|
Vector3 | The linear velocity. |
LinkedConstraints
Gets the linked constraints.
public List<Constraint> LinkedConstraints { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Constraint> | The linked constraints. |
Mass
Gets or sets the mass of this Rigidbody
[DataMember(80)]
[DataMemberRange(0, 6)]
public float Mass { get; set; }
Property Value
Type | Description |
---|---|
System.Single | true, false |
OverrideGravity
Gets or sets if this Rigidbody overrides world gravity
[DataMember(95)]
public bool OverrideGravity { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true, false |
RigidBodyType
Gets or sets the type.
public RigidBodyTypes RigidBodyType { get; set; }
Property Value
Type | Description |
---|---|
RigidBodyTypes | The type. |
TotalForce
Gets the total force.
public Vector3 TotalForce { get; }
Property Value
Type | Description |
---|---|
Vector3 | The total force. |
TotalTorque
Gets the total torque.
public Vector3 TotalTorque { get; }
Property Value
Type | Description |
---|---|
Vector3 | The total torque. |
Methods
ApplyForce(Vector3)
Applies the force.
public void ApplyForce(Vector3 force)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | force | The force. |
ApplyForce(Vector3, Vector3)
Applies the force.
public void ApplyForce(Vector3 force, Vector3 localOffset)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | force | The force. |
Vector3 | localOffset | The local offset. |
ApplyImpulse(Vector3)
Applies the impulse.
public void ApplyImpulse(Vector3 impulse)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | impulse | The impulse. |
ApplyImpulse(Vector3, Vector3)
Applies the impulse.
public void ApplyImpulse(Vector3 impulse, Vector3 localOffset)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | impulse | The impulse. |
Vector3 | localOffset | The local offset. |
ApplyTorque(Vector3)
Applies the torque.
public void ApplyTorque(Vector3 torque)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | torque | The torque. |
ApplyTorqueImpulse(Vector3)
Applies the torque impulse.
public void ApplyTorqueImpulse(Vector3 torque)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | torque | The torque. |
ClearForces()
Clears all forces being applied to this rigidbody
public void ClearForces()
OnAttach()
protected override void OnAttach()
Overrides
OnDetach()
protected override void OnDetach()
Overrides
OnUpdateDraw()
protected override void OnUpdateDraw()