-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[Bullet] Inaccurate behaviour of 3D KinematicBody move_and_slide_with_snap on vertical moving platform. #36334
Comments
The root cause is this bug #30481 (see also godotengine/godot-proposals#2332). Functions like |
This issue will be fixed by enabling |
I'm re-opening because issues are only closed when the PR that fixes them is merged, which is not the case yet. |
I don't think this problem has been solved. |
I tested the project in #36334 (comment) and enabling Sync to Physics on the moving platform does seem to help (no jitter), but it doesn't fully solve the problem indeed (still penetrating the platform). |
When moving platform's |
I see, it is happening when the player is moved in |
Moving the player in At least, that's the word I know from other engines... I don't think Godot is any different in this regard. See here for an example from how people do this in Unity: https://answers.unity.com/questions/866484/move-a-rigidbody-when-kinematic.html
(unity's |
@TokageItLab It does make sense, using kinematic motion in @lyuma You can't assume Unity's documentation applies to Godot. You need to check Godot's documentation, which states kinematic character movements should be done in The general rule is physics objects should be moved in If that causes other undesirable effects, they need to be addressed as separate issues. For jittering issues due to physics and render using different time steps, there's a new project setting you can try in 3.4 beta that can help in some cases: About the current issue: When using the MRP from #36334 (comment), it works well in Godot Physics, but there's still some lag in Bullet, so I'm going to switch this issue to Bullet specific. |
@pouleyKetchoupp There is no delta_smoothing implemented in 4.0 yet, but is there a possibility that it will be implemented in the future? In Windows, jittering doesn't occur very often, but in Mac, jittering occurs often. |
According to #48390:
I would wait for 3.4 to be released first, so that we can get some feedback on delta smoothing and apply it immediately to the port in |
Thanks a lot (all of you). Giving some feedback for myself, can confirm that when the platform is animated setting the script above to |
Of course, if you're using manual physics movement for the platform it would be best if the player movement is also calculated within physics process. |
I tested this in 3.5 RC 1 and it actually looks fine for me with Sync to Physics enabled on the moving platform. Can anyone confirm, or do I miss how the bug manifests itself? On the other hand, there seems to be a regression from #56801 where |
Just tested in 3.5 RC 1 with Sync to Physics enabled on the moving platform and There's indeed an issue when the platform is moving upwards where jitter occurs and you can't actually move it (probably related to the constant changing of And using Although as @pouleyKetchoupp mentioned, it should be running on |
Godot version:
V3.2.stable.official
OS/device including version:
Pop!_OS 19.10
Issue description:
When a 3D KinematicBody is being moved by a move_and_slide_with_snap function and sits on top of a vertical moving platform the behaviour is inaccurate: when moving upwards the mesh enters the moving platform and when moving downwards the mesh floats slightly above it.
Steps to reproduce:
3D Space:
Create a KinematicBody for the player, add as a child a MeshRenderer (CubeMesh) and a CollisionShape (BoxShape); set all margins to 0.001. Write a move_and_slide_with_snap script and attach to it.
For the moving platform, create another kinematic body with a MeshRenderer (CubeMesh) and a CollisionShape (BoxShape); again, set all margins to 0.001. As a child add an AnimationPlayer, create a new animation and animate it's translation property up and down (Y axis) with the desired speed, duration and distances. Set the ProcessMode to Physics.
Also add a Camera and adjust it so you can see the scene.
Player script:
Minimal reproduction project:
moving_platform.zip
The text was updated successfully, but these errors were encountered: