physics_fixture_set_awake

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

Syntax:

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


Description

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.


Example:

physics_fixture_set_awake(fix_Cloud, true);

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


Back: Fixtures
Next: physics_get_friction
© Copyright YoYo Games Ltd. 2018 All Rights Reserved