-
Notifications
You must be signed in to change notification settings - Fork 0
Physics_fixture_set_edge_shape
hugh greene edited this page Jun 20, 2022
·
1 revision
Sets the shape of the given fixture to an edge comprised of its currently added points. Note: Box2D requires the points to be added clockwise, and the shape to be convex
Parameter | Description |
---|---|
id | index of the fixture |
adjstart | whether or not a ghost adjacent vertice was added at the beginning |
adjend | whether or not a ghost adjacent vertice was added at the end |
void: This function does not return anything.
// demonstrates setting the shape of a fixture to a triangle making a horizontal slope going from left bottom to top right
physics_fixture_add_point(myfixture, width, -height);
physics_fixture_add_point(myfixture, width, height);
physics_fixture_add_point(myfixture, -width, height);
physics_fixture_set_edge_shape(myfixture);
NOTOC
edited by hpg678 on Github