B2d_body_apply_impulse_linear - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Applies the given direction and magnitude of the impulse 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 impulse
ypos y coordinate
ximpulse x coordinate representing the direction and magnitude of the impulse (Newtons)
yimpulse y coordinate (Newtons)

Return Values

void: This function does not return anything.

Example Call

// demonstrates applying an upwards impulse of 1000N to the body
b2d_apply_impulse_linear(0, x, y + 8, 0, -1000);

NOTOC