Topic was automatically imported from the old Question2Answer platform.
Asked By
Mudley
Old Version
Published before Godot 3 was released.
My player character is a RigidBody2D, and I am trying to make him move by overriding the ‘_integrate_forces’ function, but its behavior seems really odd.
If I start the game pressing nothing, none of the controls work. But if I start the game with one of them pressed, then it will respond while something is being pressed, after that, nothing works again.
Check out the 2D Platformer demo project (the one with the robot-looking player). That’s a good example of how to use integrated_forces on a player object.
It sounds like your issue is likely in how your code is written. And without being able to see that, it’s anybody’s guess as to what could be going on there.
The simplified code, its very rough, because I am just testing things: