Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RigidbodyComponent Class

    Namespace: Stride.Physics
    Assembly: Stride.Physics.dll
    System.Object → EntityComponent → ActivableEntityComponent → PhysicsComponent → PhysicsTriggerComponentBase → PhysicsSkinnedComponentBase → RigidbodyComponent
    Derived from RigidbodyComponent:

    [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()
    | Improve this Doc View Source

    Constructors


    RigidbodyComponent()

    public RigidbodyComponent()
    | Improve this Doc View Source

    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
    PhysicsComponent.ColliderShape

    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.

    | Improve this Doc View Source

    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
    PhysicsTriggerComponentBase.OnAttach()

    OnDetach()

    protected override void OnDetach()
    Overrides
    PhysicsComponent.OnDetach()

    OnUpdateDraw()

    protected override void OnUpdateDraw()
    Overrides
    PhysicsComponent.OnUpdateDraw()

    Inherited Members

    PhysicsSkinnedComponentBase.NodeName
    PhysicsSkinnedComponentBase.SetupBoneLink()
    PhysicsTriggerComponentBase.IsTrigger
    PhysicsTriggerComponentBase.Enabled
    PhysicsComponent.logger
    PhysicsComponent.ColliderShapes
    PhysicsComponent.CollisionGroup
    PhysicsComponent.CanCollideWith
    PhysicsComponent.ProcessCollisions
    PhysicsComponent.CanSleep
    PhysicsComponent.IsActive
    PhysicsComponent.Activate(Boolean)
    PhysicsComponent.Restitution
    PhysicsComponent.Friction
    PhysicsComponent.RollingFriction
    PhysicsComponent.CcdMotionThreshold
    PhysicsComponent.CcdSweptSphereRadius
    PhysicsComponent.Collisions
    PhysicsComponent.NewCollision()
    PhysicsComponent.CollisionEnded()
    PhysicsComponent.Simulation
    PhysicsComponent.ColliderShapeChanged
    PhysicsComponent.colliderShape
    PhysicsComponent.CanScaleShape
    PhysicsComponent.PhysicsWorldTransform
    PhysicsComponent.Tag
    PhysicsComponent.BoneWorldMatrix
    PhysicsComponent.BoneWorldMatrixOut
    PhysicsComponent.BoneIndex
    PhysicsComponent.Data
    PhysicsComponent.DebugEntity
    PhysicsComponent.AddDebugEntity(Scene, RenderGroup, Boolean)
    PhysicsComponent.RemoveDebugEntity(Scene)
    PhysicsComponent.UpdatePhysicsTransformation()
    PhysicsComponent.ComposeShape()
    PhysicsComponent.OnUpdateBones()
    PhysicsComponent.IgnoreCollisionWith(PhysicsComponent, CollisionState)
    PhysicsComponent.IsIgnoringCollisionWith(PhysicsComponent)
    EntityComponent.Entity
    EntityComponent.Id
    EntityComponent.EnsureEntity

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation