-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
_integrate_forces / KinematicCollision3D bug #85561
Comments
I narrowed the issue down to this recent change that causes the issue: |
CC @mihe |
Yeah, I've spoken to @prominentdetail elsewhere already. I'm looking at it. (Also, the mentions of "rc5" and "rc6" are meant to say "beta5" and "beta6" respectively.) |
@prominentdetail Are you sure that a3278c7 is the offending commit? Reverting that commit shouldn't make any difference as far as 3D physics is concerned, since the When bisecting I'm finding #84799 (aka 6415006) is where this behavior changed, which makes more sense, since that one was merged between 4.2-beta5 and 4.2-beta6. I can't speak to whether the regression itself is a valid one just yet though. I need to take a closer look at why this would affect |
I'm not sure- maybe I am not referencing the right commit, but when I commented out these lines from the latest version, it works:
|
Just to give a minor update here: I've come to understand what the problem is here, and it breaks down to something quite fundamental about the intended purpose of I've been pondering over this for a few days now, trying to think of how to best fix this, but I think I'll just end up submitting multiple PRs and start some kind of discussion about which might be the best approach. As far as your specific problem is concerned, @prominentdetail, by commenting out that code you showed above you are effectively turning your "body will sink into floor when landing" workaround into a no-op, since any transform changes you make in I also get the feeling that your workaround maybe wasn't doing what you hoped it would, as you (in 4.1) would end up setting the linear velocity for this physics step, but you'd actually end up setting the transform (in the physics server) on the next physics step, which is why your character keeps falling down in that repro (in 4.1) when it rightfully should come to a dead stop as soon as it touches the ground. You can achieve the proper effect (in 4.1) by changing |
@mihe , thanks- I can confirm that 4.2stable as-is works if I just remove the workaround in my main project. I think I remember that the workaround didn't really solve the issue entirely anyway, and I had to do some other things to make stuff work how I wanted it to. That is interesting to know about the difference between state.transform and transform. Is that still the case with 4.2? So if I understand- state.transform will change the current step whereas transform will change the next step? |
Yes and no. This is what unfortunately changed/broke in 4.2, and which requires further discussion on how to fix properly. The physics engine in Godot is always one step ahead of the idle tick (and the rendering), and prior to #79977 the So reverting #79977 and everything that followed from that is one solution to all this, but it re-introduces other weird and unintuitive behaviors, hence why some bigger discussion needs to be had. I'll try to have it written up properly within the next couple of days. |
Godot version
4.2 rc 6 and newer
System information
windows 10
Issue description
I've attached a minimum reproduction project.
The KinematicCollision3D seems to not work the same after 4.2 rc 5.. In rc 6 and newer version it is broken.
rc5:
rc6:
Steps to reproduce
Run example project in rc5 or older, compare to rc6 and newer.
Minimal reproduction project
RigidBody Character Bug.zip
The text was updated successfully, but these errors were encountered: