Thanks so much for this, I've been using this controller while I learn Godot! Small question, if the player node's starting rotation is 90 degrees (so it's facing the correct way within the scene), how can I avoid the controls also having 90 degree rotation applied? Or must the player node rotation always stay as 0, and I somehow rotate the scene 90 degree around the player? Thanks again!
And for your question… don’t rotate the scene around the player, just put the player and rotate that node. Why is the player rotation a problem? I’ve been using it in different scenes and didn’t found the rotation to be a problem 🙂
Even in the latest version of the project which I grabbed from github, WASD movement is rotated 90 degrees if the Player node was rotated 90 degrees within the world. I'm not sure why the rotation is a problem, but if it definitely works on your side then I'll keep digging to find out what I've missed :)
Just found out, the camera was using local rotation instead of global. In line 60 camera.transform.basis should be camera.global_transform.basis. Fixed in the new version v3.1.1.
There are two things I'm trying to figure out with my copy of BasicFPC. I'm intending to solve these myself but I will also send the feedback here in case it's useful for you.
1. Handle head bumps so if the character's head hits the ceiling they don't hover.
2. Fix movement issues when using keyboard controls while PS4 controller is connected.
Anyway I'm just having fun with all this, and you've saved me a lot of time!
If you are still having problems, right click on the player controller in the scene you are working with and hit "Make Local" and you then you can rotate the camera to change the direction that player is facing without messing with its movement
Hopefully this helps someone, I had a similar issue but was watching a video and saw someone do it.
I just pushed a little update that should prevent any issues with the starting rotation of the player node (on the Y axis). The new version is the v3.1.1. 😊
← Return to Godot 4 Base Project
Comments
Log in with itch.io to leave a comment.
Thanks so much for this, I've been using this controller while I learn Godot! Small question, if the player node's starting rotation is 90 degrees (so it's facing the correct way within the scene), how can I avoid the controls also having 90 degree rotation applied? Or must the player node rotation always stay as 0, and I somehow rotate the scene 90 degree around the player? Thanks again!
Thank you for your support! 😄
And for your question… don’t rotate the scene around the player, just put the player and rotate that node. Why is the player rotation a problem? I’ve been using it in different scenes and didn’t found the rotation to be a problem 🙂
Even in the latest version of the project which I grabbed from github, WASD movement is rotated 90 degrees if the Player node was rotated 90 degrees within the world. I'm not sure why the rotation is a problem, but if it definitely works on your side then I'll keep digging to find out what I've missed :)
I will take a look at the problem in a few days, it may be a bug 🐛
Just found out, the camera was using local rotation instead of global. In line 60 camera.transform.basis should be camera.global_transform.basis. Fixed in the new version v3.1.1.
Amazing, thank you!
There are two things I'm trying to figure out with my copy of BasicFPC. I'm intending to solve these myself but I will also send the feedback here in case it's useful for you.
1. Handle head bumps so if the character's head hits the ceiling they don't hover.
2. Fix movement issues when using keyboard controls while PS4 controller is connected.
Anyway I'm just having fun with all this, and you've saved me a lot of time!
Having fun is the most important thing!
And about those issues…
Maybe try to use the is_on_ceiling() or is_on_ceiling_only() functions from CharacterBody3D? 🤔
What issues exactly? Stopping from moving of something like that?
If you are still having problems, right click on the player controller in the scene you are working with and hit "Make Local" and you then you can rotate the camera to change the direction that player is facing without messing with its movement
Hopefully this helps someone, I had a similar issue but was watching a video and saw someone do it.
Thank you for offering a solution 🫶
I just pushed a little update that should prevent any issues with the starting rotation of the player node (on the Y axis). The new version is the v3.1.1. 😊
Yea, no problem!
And thanks for upgrading the script, this means I won't have to do this everytime(or make different scenes for each rotation I want)
Thanks so much, maybe this will help me make in 3d again!