Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KinematicBody2D: test_move breaks when parent is offset from (0, 0) #26003

Open
Tracked by #45334
11clock opened this issue Feb 18, 2019 · 2 comments
Open
Tracked by #45334

KinematicBody2D: test_move breaks when parent is offset from (0, 0) #26003

11clock opened this issue Feb 18, 2019 · 2 comments

Comments

@11clock
Copy link

11clock commented Feb 18, 2019

Godot version:
3.1 beta 4

OS/device including version:
Windows 10

Issue description:
When a kinematic body 2d's parent does not have the position (0, 0), test_move behaves incorrectly.

Steps to reproduce:
Open attached project. Play the LevelBase scene by itself. Notice that it works normally. Now change LevelBase's position and test again. Notice that the platformer character will no longer behave correctly, such as refusing to jump, fast falling off ledges, etc. These have to do with the test_move checks in Player.gd, which is basic platforming logic.
you can also test
in TestRoom.tscn, and see how it impacts the game in Main.tscn.

Minimal reproduction project:
Spectrum.zip

@mrcdk
Copy link
Contributor

mrcdk commented Feb 18, 2019

This is a documentation issue, test_move() needs the global transform of the object.

@vesk4000
Copy link

Wow thanks for the clarification that test_move() requires the global transform! But this is seriously terrible documentation, I mean it's kind of alright for the most part, but there are so many things that are underdocumented in Godot, and this one just ruined a whole game jam for me. I'll definitely try to fix this in the documentation, although I have never edited it, so I hope it is not too hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants