get_hitbox_angle

Returns the angle that the hitbox sends. The function takes the current object’s position into account for angle flippers.

ArgumentTypeDescription
hitbox_id:realThe ID of the hitbox to get the angle of

Example, called from article1_update.gml:

// this non-player object has a custom KB formula when hit by a hitbox:
var temp_angle = get_hitbox_angle( enemy_hitboxID );
var force = enemy_hitboxID.kb_value + enemy_hitboxID.kb_scale * 12;
hsp = lengthdir_x( force, temp_angle );
vsp = lengthdir_y( force, temp_angle );