Skip to content

Conversation

@Steve0Greatness
Copy link
Contributor

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:

Screenshot 2026-01-19 191552
box2d-tw-change-showcase.mp4

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.

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.

Fix was changing character 13723:62 to a y, instead of an x.
@github-actions github-actions bot added the pr: change existing extension Pull requests that change an existing extension label Jan 20, 2026
@Brackets-Coder
Copy link
Contributor

I'll investigate this

@Brackets-Coder Brackets-Coder self-assigned this Jan 20, 2026
Copy link
Contributor

@Brackets-Coder Brackets-Coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this fixes a typo that breaks expected behavior. Nice catch!

  • I tested all modified functionality and found no bugs or unintuitive behavior.
  • I believe a well-formed project using an older version of this extension will not be broken by this new version. - some projects may use workarounds to fix this manually, so fixing it in the extension may break their workarounds. I can't confirm this but it's such a trivial change that I'm going to approve
  • I have no additional concerns.

Brackets-Coder

This comment was marked as spam.

@Brackets-Coder
Copy link
Contributor

oops accidentally double-commented

@SharkPool-SP or @PPPDUD could you review and approve so we can get this merged?

@SharkPool-SP
Copy link
Collaborator

This will break compatibility

@Brackets-Coder
Copy link
Contributor

Yes, it will, but is it a sacrifice we're willing to make? It's likely that we're going to have users create issues about it not working if this is merged but it's also not working as intended right now

@SharkPool-SP
Copy link
Collaborator

Eh good point

@Brackets-Coder
Copy link
Contributor

Alright I'ma go ahead and merge

@Brackets-Coder Brackets-Coder merged commit dd0a0c8 into TurboWarp:master Jan 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: change existing extension Pull requests that change an existing extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Box2D go to x y relative does not work?

3 participants