J
Jacceb99
Guest
This is my code. posY being the point where it shouldn't go past.
I thought this would make the object teleport back 1 pixel to posY everytime it goes past it. And it kinda works, but if the vspeed is to high i think, it gets stuck(The object switches to positive Vspeed sometimes and is supposed to go up again). Which in my brain is impossible because if for example it goes past the point by 5 pixels in one step, y is still larger than posY and it should teleport back. Idk maybe the issue is obvious here. Thanks in advance.
Code:
//STEP EVENT
if y > posY
{
y=posY;
}