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



参数 描述
y1 the iterations (per step) that the physics system will perform

返回: N/A(无返回值)


Everything in GameMaker Studio 2 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.



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

上一页: The Physics World
下一页: physics_world_update_speed
© Copyright YoYo Games Ltd. 2018 All Rights Reserved