Skip to content

RigidBody2DComponent

class · namespace Hazel · Component

Inherits Component

public class RigidBody2DComponent : Component

Properties

BodyType

public RigidBody2DBodyType BodyType { get; set; }

GravityScale

public float GravityScale { get; set; }

LinearVelocity

public Vector2 LinearVelocity { get; set; }

Mass

public float Mass { get; set; }

Rotation

public float Rotation { get; set; }

Translation

public Vector2 Translation { get; set; }

Methods

AddForce(Vector2, Vector2, bool)

public void AddForce(Vector2 force, Vector2 offset, bool wake)

AddTorque(float, bool)

public void AddTorque(float torque, bool wake)

ApplyAngularImpulse(float, bool)

public void ApplyAngularImpulse(float impulse, bool wake)

ApplyLinearImpulse(Vector2, Vector2, bool)

public void ApplyLinearImpulse(Vector2 impulse, Vector2 offset, bool wake)

Source: Hazel/Scene/Components.cs