Character doesn't move when WASD Pressed?

Godot Version

4.4.1

Hello, this is my first time here. I needed help because my character won’t move. I am assuming it is something to do with the collision.

Does your code have movement keys hooked up? Are WASD in your input map?

Hey hexgrid, jumping in here since I’m having a similar issue. I double-checked and the WASD keys are set up in the Input Map, and I’ve got code that should handle movement, but the character still doesn’t move. I’m wondering if a collision shape or rigid body setting might be blocking the motion somehow. Did you ever run into something like that?

I haven’t run into that, but in that case I think the first thing I’d check is the collision masks. Is there maybe something attached to the player that’s colliding with the player? Or are they being dropped somewhere on the level that’s “inside” something?

One thing I recommend for problems like this is you add a text box floating over things like the player, mobs, doors, anything with behaviour. Make it invisible normally, but make it so you can toggle everything visible. Have everything scribble info up there like current actions, maybe animation state, intent, whatever is useful…

It can be incredibly useful when you’re staring at something weird and asking “why is it doing that?”. It can also sometime help you catch background bugs.

In this case, for instance, you’ve presumably got move_and_slide() being called, and that returns a bool telling you whether there was a collision. That will at least tell you whether your theory is valid, and you could call get_slide_collision() and so forth to try to see what’s going on.

@Aeromax @laugine It would be helpful if you both copy/pasted your movement code and maybe show your scene tree so we can take a look and see what’s going on.

If you think a setting in the inspector is the culprit, it would be a good idea to screenshot that too and share it.

Also, if you’re following a tutorial, please link the tutorial.