Table of Contents

Class Rigidbody

Namespace
AO
Assembly
CoreAssembly.dll

Component that include the entity in the physics simulation as a rigid body

public class Rigidbody : Component
Inheritance
Rigidbody
Inherited Members
Extension Methods

Fields

CustomImpulseCallback

Custom impulse function. If this rigidbody's entity has network_position enabled, then any forces applied through this function are also automatically clientside-predicted! Otherwise this callback isn't very useful, because you could just apply the impulse yourself.

[Obsolete("Use Movement_Agent.CustomVelocityCallback instead.")]
public Func<Rigidbody, Vector2> CustomImpulseCallback

Field Value

Func<Rigidbody, Vector2>

Properties

Velocity

Get/Set the velocity of the rigidbody

public Vector2 Velocity { get; set; }

Property Value

Vector2

Methods

ApplyForce(Vector2, Vector2)

public void ApplyForce(Vector2 force, Vector2 point)

Parameters

force Vector2
point Vector2

ApplyForceToCenter(Vector2)

public void ApplyForceToCenter(Vector2 force)

Parameters

force Vector2

ApplyLinearImpulse(Vector2, Vector2)

public void ApplyLinearImpulse(Vector2 impulse, Vector2 point)

Parameters

impulse Vector2
point Vector2

ApplyLinearImpulseToCenter(Vector2)

public void ApplyLinearImpulseToCenter(Vector2 impulse)

Parameters

impulse Vector2