Skip to content
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

RayShapes in 3D sometimes causes player to vibrate in place #34663

Closed
Tracked by #45333
DenisBelmondo opened this issue Dec 29, 2019 · 6 comments · Fixed by #51896
Closed
Tracked by #45333

RayShapes in 3D sometimes causes player to vibrate in place #34663

DenisBelmondo opened this issue Dec 29, 2019 · 6 comments · Fixed by #51896

Comments

@DenisBelmondo
Copy link

Godot version:
3.2

OS/device including version:
Windows 10 64-bit

Issue description:
Player with multiple RayShapes as part of their Collision Shapes vibrates in place very slightly when just on ground.

Steps to reproduce:
In the reproduction project, walk for a brief moment and then stop. You can observe the player vibrating in place very slightly even when fully stopped. This is very inconsistent, so it may take a few tries to be able to see it.

Minimal reproduction project:
movement - Copy.zip

Additional notes:
This still occurs even with one RayShape. To test, delete all the nodes named "LegX" (where X is a number) except for "Leg5".

@Calinou
Copy link
Member

Calinou commented Dec 29, 2019

Can you reproduce this if you set Physics > 3d > Physics Engine to GodotPhysics in the Project Settings?

@DenisBelmondo
Copy link
Author

Hello @Calinou, yes. I can verify that this occurs under Bullet and GodotPhysics on my end.

@jasonswearingen
Copy link

I am just starting to enter this hobby and godot, but this sounds pretty typical of any (all?) physics systems. @DenisBelmondo perhaps try find a way to dampen physics on the object after stopping movement.

@DenisBelmondo
Copy link
Author

Hello @jasonswearingen, welcome. Unfortunately, at least, as a result of my own testing, I have ensured that my player's Y velocity while standing on the floor is 0.0.

When explicitly setting the Y velocity to 0.0 during floor checks, the single RayShape setup seems to benefit the most (very little visible jittering in place), though the multiple RayShape setup seems to jitter regardless.

This could be because the use of multiple RayShapes in this way is non-standard. Many RayShapes at once trying to de-penetrate the player, or something along those lines.

@madmiraal
Copy link
Contributor

Duplicate of #29392?

@David-Ochoa
Copy link

Duplicate of #29392?

No, it's not the same issue. Because of #29392 I had to change from inividual collision boxes to one big shape for the floor and I'm having the same problem: Jitter

pouleyKetchoupp added a commit to nekomatata/godot that referenced this issue Jan 8, 2021
These changes improve Rayshape behavior for Godot Physics 2D and 3D
when using move_and_slide with and without snapping.

Kinematic margin is now applied to ray shapes when handling snapping
collision tests and separation raycasts to help getting consistent
results in slopes and flat surfaces.

Recovery is calculated without the margin and a depth of 0 is still
considered a collision to stabilize results when on flat surface.

Recovery is split based on the amount of shapes to fix cases where
multiple rayshapes would cause the body to bounce.

Fixes godotengine#34098
Fixes godotengine#34663
pouleyKetchoupp added a commit to nekomatata/godot that referenced this issue Jan 8, 2021
These changes improve Rayshape behavior for Godot Physics 2D and 3D
when using move_and_slide with and without snapping.

Kinematic margin is now applied to ray shapes when handling snapping
collision tests and separation raycasts to help getting consistent
results in slopes and flat surfaces.

Recovery is calculated without the margin and a depth of 0 is still
considered a collision to stabilize results when on flat surface.

Recovery is split based on the amount of shapes to fix cases where
multiple rayshapes would cause the body to bounce.

Fixes godotengine#34098
Fixes godotengine#34663
@akien-mga akien-mga added this to the 4.0 milestone Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants