forked from genewildish/Mainline
Fix bounce camera acceptance test with unrealistic speed #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The bounce camera acceptance test (
tests/test_camera_acceptance.py::TestBounceCamera::test_bounce_camera_reverses_at_edges) fails because it usesspeed=5.0which causes the camera to move 300 pixels per frame (since 60fps * 5 = 300). This makes the camera bounce every frame because it immediately exceeds the viewport boundaries.Expected vs Actual
After 51 frames, test expects camera to be at
max_xbut it ends at 0 because:camera.reset()is calledProposed Solutions
Either:
Related Files
tests/test_camera_acceptance.pyengine/camera.pyTest Status
One of 2 failing acceptance tests blocking full test suite pass.
Part of larger effort: Complete pipeline demo and acceptance tests (current status: 671/673 passing)
Fixed in commit:
0eb5f1d: Reset camera bounce direction state in reset() methodThe camera reset() method now properly resets the bounce direction state (_bounce_dx, _bounce_dy) and radial state (_r_float, _theta_float) when called. This ensures that the bounce camera test can reliably predict the camera position after a reset, regardless of previous state.