Show / Hide Table of Contents

    Class Rigidbody4

    Rigidbody makes the object is participating in the physics simulations.

    public class Rigidbody4 : MonoBehaviour4
    Namespace Engine4.Physics
    Inheritance
    System.Object
    MonoBehaviour4
    Rigidbody4
    Remarks

    It's generally not a good idea if you put the same rigidbody in the same object, or in the parent, as both will change transformation together and causing deadlocks.

    Constructors

    Rigidbody4()

    public Rigidbody4()

    Properties

    angularDamping

    Angular damping of the body

    public float angularDamping { get; set; }

    angularVelocity

    Angular velocity of this rigidbody (radian/sec)

    public Euler4 angularVelocity { get; set; }

    gravityScale

    Amount of gravity that affects the body

    public float gravityScale { get; set; }

    linearDamping

    Linear damping of the body

    public float linearDamping { get; set; }

    linearVelocity

    Linear velocity of this rigidbody (world unit/sec)

    public Vector4 linearVelocity { get; set; }

    type

    Rigidbody type during simulation

    public BodyType type { get; set; }

    Methods

    AddForce(Vector4)

    Add a force

    public void AddForce(Vector4 force)
    Remarks

    A force is affected by delta time and mass and it is generally accumulated over time.

    AddForceAtPosition(Vector4, Vector4)

    Add force at position

    public void AddForceAtPosition(Vector4 force, Vector4 point)

    AddImpulse(Vector4)

    Add an impulse

    public void AddImpulse(Vector4 impulse)
    Remarks

    An impulse is not affected by delta time but mass and it is generally applied once.

    AddTorque(Euler4)

    Add torque (force in terms of rotation)

    public void AddTorque(Euler4 torque)

    Sleep()

    Set rigidbody to sleep

    public void Sleep()

    ToString(Boolean)

    Dump state to string for debugging ease.

    public string ToString(bool report)

    WakeUp()

    Wake up rigidbody if it sleeping

    public void WakeUp()
    ▲ Copyright © 2017 Wello Soft