physics_apply_angular_impulse

This function applies an angular impulse to a physics enabled instance.

语法:

physics_apply_angular_impulse(impulse)


参数 描述
impulse The impulse (in Newton metres) to be applied


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


描述

This function will give an angular impulse to a physics enabled instance. This impulse will set the angular rotation by the amount given, ignoring the current torque, essentially setting the amount of "spin" that a fixture has. If you wish to apply an angular force to an instance using torque, then you should be using the function physics_apply_torque().


例如:

if keyboard_check(vk_up) physics_apply_angular_impulse(10);

The code above will give the physics enabled fixture an angular impulse if a key is pressed.


上一页: Forces
下一页: physics_apply_force
© Copyright YoYo Games Ltd. 2018 All Rights Reserved