Skip to content

B2d_body_apply_force

hugh greene edited this page Jun 20, 2022 · 1 revision

Description

Applies the given direction and magnitude of the force in newtons to the given body at the given position.

Parameters

Parameter Description
id index of the body
xpos x coordinate representing the epicentre of the force
ypos y coordinate
xforce x coordinate representing the direction and magnitude of the force (Newtons)
yforce y coordinate (Newtons)

Return Values

void: This function does not return anything.

Example Call

// demonstrates applying an upwards force of 1000N to the active fixtures
b2d_body_apply_force(mybody, x, y + 8, 0, -1000);

NOTOC

Clone this wiki locally