A
AlphaRedDragon
Guest
So Im Pretty Sure im not the first to ask this, but for some reason, when my player changes direction with his walk animation, he gets stuck in the wall, ive checked to make sure that the animation is the same width as the still player but it still didnt help, is there some specific collision system for this cause my current one is not working
current collision system
// horizantal collission
if (place_meeting(x+hsp,y,obj_collide))
{
while(!place_meeting(x+sign(hsp),y,obj_collide))
{
x += sign(hsp);
}
hsp = 0;
}
//vert collision
if (place_meeting(x,y+vsp,obj_collide))
{
while(!place_meeting(x,y+sign(vsp),obj_collide))
{
y += sign(vsp);
}
vsp = 0;
}
If you have any questions, or need any additional info, let me know because i cant make prgress in my game until this gets sorted, thanks
current collision system
// horizantal collission
if (place_meeting(x+hsp,y,obj_collide))
{
while(!place_meeting(x+sign(hsp),y,obj_collide))
{
x += sign(hsp);
}
hsp = 0;
}
//vert collision
if (place_meeting(x,y+vsp,obj_collide))
{
while(!place_meeting(x,y+sign(vsp),obj_collide))
{
y += sign(vsp);
}
vsp = 0;
}
If you have any questions, or need any additional info, let me know because i cant make prgress in my game until this gets sorted, thanks