The code below is for resetting a block thats falling from above the screen. As soon as it hits
the 430 limit it gets set to the top again but it remains stuck, for some reason.I Verfied by putting a print statement, cant figure how the condition is becoming true repeatdely.
if position.y>430:
position.y=0
print("pos y=",position.y)
As this is a RigidBody2D, if you need to directly change its position, you should do it in the _integrate_forces(), not _process().
Also, if this body is in a freefall, you should reset its linear_velocity, otherwise it will keep accumulating. And I guess that’s probably what happens in your case - the body accumulates so much velocity that it flies more than 430 pixels in 1 frame, so it’s always triggering your reset code.