kureoni
Member
so, in my game, there is mobs that follows you once they are spawned, but since these mobs' angle always face the player position, sometimes they turn their angle and the collision box of the mob gets stuck inside of the collision box of the wall and sometimes, inside of the collision box of each other, is there any code that pushes an object away of the collision box of the other object if it gets stuck or any code that prevents that?
the collision code of the mobs is overall fine, thats the only issue i'm having rn.
it turn around walls to get the player etc
but sometimes there is this issue with the angle rotating etc
the collision code of the mobs is overall fine, thats the only issue i'm having rn.
GML:
if life>0 && instance_exists(obj_player){
image_angle = point_direction(x, y, obj_player.x, obj_player.y);
mp_potential_step(obj_player.x,obj_player.y,spd,obj_walls && obj_hole)
}
but sometimes there is this issue with the angle rotating etc