This function tells GameMaker: Studio that the fixture is to be treated as awake or not.


GML Code Example

physics_fixture_set_awake(fixture, state)

Argument Description
fixture the index of the fixture
flag whether a fixture is awake (true) or not (false)

Returns: N/A


When you start a room with physics, or bind fixtures to instances, the fixtures are always considered to be "awake"... that is to say, they are processing events and interacting with the surrounding instances. However this can sometimes lead to problems, especially if you have a number of instances with fixtures that are side by side when a room starts (think of a tower made of various instances with fixtures) as with them being "awake" they will move and possibly change position due to the sudden start of gravity and collisions affecting them. In these cases you can use this function to flag the fixture as been "asleep", in which case it will not be processing anything when it is first created in the room.


GML Code Example

physics_fixture_set_awake(fix_Cloud, true);

The code above flag the fixture as being "awake" when bound to an instance.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here