NovemberTender
Member
i'm not sure if im doing it right but, it somehow works. I have 4 sprites for each direction( so i dont have to flip the sprite in code)
and i tried to find the direction using collision mask, is there any other better way? i've tried my best looking up cardinal direction and collision masks. but im not sure how to see if im on the "left side" of a square exactly, and not in the middle.
here is an example wich kinda works for left side.
and i tried to find the direction using collision mask, is there any other better way? i've tried my best looking up cardinal direction and collision masks. but im not sure how to see if im on the "left side" of a square exactly, and not in the middle.
here is an example wich kinda works for left side.
GML:
//collision
if (place_meeting(x,y,pCollision)) and (image_index != 0)
{
//left
if (place_meeting(bbox_left,bbox_left,oEarthtexture))
{
instance_create_layer(x,y,"Projectiles",oEarthblockHitBox);
}
instance_destroy();
}