SimulationBody

class in Eddie

Description

Extends AbstractBody.

Simulation body. Will be used to calculate and simulate movement.

Constructors

SimulationBody(Vector2 position, Vector2 size, float drag, float gravity, bool realtimeFramerate = false)
Parameter Description
position The starting position of the body.
size The size of the body.
drag Linear drag of the body.
gravity Gravity scale of the body.
realtimeFramerate realtimeFramerate ? Time.deltaTime : Time.fixedDeltaTime

Properties

Property Description
Velocity The velocity of the body.
Position The position of the body.
Drag Liear drag of the body.
Gravity The gravity scale of the body.

Methods

Method Description
getDeltaTime Returns realtimeFramerate ? Time.deltaTime : Time.fixedDeltaTime.
addForce Adds force to the body.
UpdateFrame Calculates frame update of a specified duration.