-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
CharacterBody3D move_and_slide use an hardcoded delta time #71999
Comments
I don't know why we don't have delta as an argument for move_and_slide() method, it could help if we want to create some slowmotion feature for our CharacterBody3D. I think it could resolve many problems at once or i'm mistaken ? |
Calling
This of course is just a workaround, I too would see some value in optional delta parameter. However, I believe this should be in godotengine/godot-proposals to gauge it's need before implementing. |
You're right, I should have posted this in godotengine/godot-proposals, my bad. I was quite tired when I posted this. Thanks you for the workaround, I tried to do the same thing but used a for loop which called move_and_slide multiple times based on the difference of the two delta times, which was really not working (obviously) Do you think I should close this and create a proposal instead? |
Well, I'm not moderator or anything, so take that as a disclaimer. But that's what I'd do. Less headache for project management when everybody goes by the book. |
Is that what move_and_collide is for? You utilize delta there for the vector input. Although you need to handle the custom behaviour on your own then. |
This is done by design, just like in 3.x. This has been extensively discussed on GitHub issues in the past, though I can't find links to the issues in question right now.
You probably want support for manual physics simulation instead, which isn't implemented yet: godotengine/godot-proposals#2821 |
Godot version
v4.0.beta14.mono.official [28a2463]
System information
Win11
Issue description
move_and_slide()
inCharacterBody3D
uses an hardcoded delta time which make it impossible to apply multiple inputs in the same frame.I'm developing a fast-paced multiplayer game in which I want to implement client prediction and lag compensation. I need a way to apply a list of inputs (or velocity) multiple times in the same frame with each of them responding to collisions. Each of theses inputs should be executed 0.05 seconds apart (delta time), but as the delta time is hardcoded this make it quiet challenging.
I may be doing something wrong here, perhaps something not supported, in that case please let me know.
The documentation says nothing about calling
move_and_slide
only once per frame or something like that.Steps to reproduce
godot/scene/3d/physics_body_3d.cpp
Lines 1159 to 1161 in 9937915
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: