godotengine / godotengine/godot
CharacterBody3D basic movement template uses wrong interpolation for movement
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in Godot v4.3-beta1 and probably earlier ones
### System information
Windows 11 - Godot v4.3-beta1 - Vulkan (Forward+)
### Issue description
This is a bug with how the basic movement template is written for CharacterBody3D.
When moving at angles that aren't a factor of 45 degrees, you can notice the player kind of curves when starting to move and stopping, due to the movement script using linear interpolation instead of cubic interpolation for movement.
While only the stopping is present in the template, and it's very hard to notice without a crosshair, I would propose making the small change to fix it and potentially add the new interp when starting to move as I did in the template project.
### Steps to reproduce
Run the game and walk towards the different poles, either in-line with the grid or at a 45 degree angle to the grid. Then walk towards them at any other angle. Make sure your crosshair is aligned with part of the pole and pay attention to how it moves.
Now go back into the editor and select the CharacterBody3D. Check the exported box called "Cubic Interp" and re-run the game. Repeat the same steps as above and notice how there's not additional movement from the character.
Here's a recording showing the effect as well, in case I'm not explaining it right.
https://github.com/godotengine/godot/assets/16853086/d8322f93-bc95-4ac8-8643-c024cdb2c32c
### Minimal reproduction project (MRP)
[project.zip](https://github.com/user-attachments/files/15793043/project.zip)
Contributor guide
Assessment
This issue has not been assessed yet.