Commit dd0a0c8
authored
box2d: Correct mixup of the x and y coordinates (#2391)
The relative space type of the set position block in Box2D was set
incorrectly such that it set the y position relative to the current x
position rather than the y position.
This means that setting inputs of -2, 20 would result in the sprite
going negative in both directions, with the y coordinate always being
+20 > the x coordinate. (see below video)
------------------------------------------------------------------------------------------------------
The following video shows the incorrect behavior (current) and the
corrected behavior (this patch) using the same script:
<img width="349" height="347" alt="Screenshot 2026-01-19 191552"
src="https://github.com/user-attachments/assets/f83b7674-7d5c-485f-96e1-9bd1bd244d5f"
/>
https://github.com/user-attachments/assets/fe0ba0cd-c4cf-4379-8e03-de75ef6a31f1
------------------------------------------------------------------------------------------------------
Didn't look before making this change but I'm pretty sure this patch
resolves this issue:
Fixes #935
Also, I think this bug is almost 7 years old, since I found the original
patch in Griffpatch's VM fork, and it's from February 2019.1 parent 91cad00 commit dd0a0c8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13720 | 13720 | | |
13721 | 13721 | | |
13722 | 13722 | | |
13723 | | - | |
| 13723 | + | |
13724 | 13724 | | |
13725 | 13725 | | |
13726 | 13726 | | |
| |||
0 commit comments