physics_world_update_iterations

This function controls the number of iterations per step of the physics world.

Syntax:

physics_world_update_iterations(iterations)


Argument Description
y1 the iterations (per step) that the physics system will perform


Returns: N/A


Description

Everything in GameMaker: Studio is based around steps and, normally, each event will only happen once per step. However, to get the necessary precision with the physics functions they are made to do several calculations each step which are called "iterations" the number of which are controlled by this function. The default number for the physics system is 10, but this can be changed to higher or lower depending how many times you want the physics to calculate each step, but it is recommended that you set this no lower than 5 and no higher than 30. You should also be aware that this function is dependant on the physics_world_update_speed function.


Example:

physics_world_update_iterations(20)

The code above sets the physics world in the current room to perform calculations 20 times a step.


Back: The Physics World
Next: physics_world_update_speed
© Copyright YoYo Games Ltd. 2018 All Rights Reserved