Why cube goes up after reaching bottom of window

I don’t understand why the cube goes up after reaching bottom of window. I get that the distance turns into a negative value, but isn’t it just going to subtract from axe_y value of 450 after that ? and shouldn’t it it just hit the axe_y > 450 again ?

It’s not about distance, it’s about direction.

Before the next frame, axe_y gets modified once direction gets changed, ideally reducing axe_y to a value that’s less than 450. So the test for axe_y > 450 will fail on the next frame.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms