-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Check for motion in cast_motion() before doing Bullet convexSweepTest(). #34219
Check for motion in cast_motion() before doing Bullet convexSweepTest(). #34219
Conversation
2159d65
to
ccfdae0
Compare
Ping @AndreaCatania |
8f6cbe2
to
1bbe7c1
Compare
Does |
The short answer is yes, and it should be the same as whatever we decided here. The long answer is that the problem lies with the godot/servers/physics/gjk_epa.cpp Lines 843 to 846 in 1c6d1fc
godot/servers/physics/gjk_epa.cpp Lines 917 to 929 in 1c6d1fc
Therefore, instead of returning a negative distance or even zero, it sends a signal that it is unable to calculate the distance. This godot/servers/physics/space_sw.cpp Lines 271 to 273 in 1c6d1fc
|
1bbe7c1
to
3ab4b62
Compare
Rebased following multiple changes to master. Since this is no longer cherry-pickable. I'll create a separate pull request with the original changes against the 3.2 branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok to be merged, Thanks!!
Also ensure that default closest_safe and closest_unsafe values are defined in cast_motion() and before cast_motion() is called.
3ab4b62
to
8ffe905
Compare
Thanks! |
Addresses: #34210 (comment)
Also ensures that default
closest_safe
andclosest_unsafe
values aredefined both in
cast_motion()
and beforecast_motion()
is called in camera.cpp and physics_server.cpp.Note: The other use of
cast_motion()
(in spring_arm.cpp) defines default values for the variables used forclosest_safe
andclosest_unsafe
:godot/scene/3d/spring_arm.cpp
Lines 141 to 142 in 2ebc783
before calling
cast_motion()
:godot/scene/3d/spring_arm.cpp
Line 158 in 2ebc783