Giter Club home page Giter Club logo

Comments (4)

smix8 avatar smix8 commented on September 7, 2024 2

The only difference is that before, because a Node3D pushed all its transforms to all the children, it would show a false debug state, more so now with interpolation. The actual shape would move smooth as it would be updated twice, but it was also wrong half the time. The real physics shape was never in that position when it was not updated with the physics sync, it was a visual lie.

With the linked PRs the shape is only update when it is really updated and that reveals to users how physics actually does the update, it jitters just like physics always does because it is not necessarily in sync with the frame rate.

Going back to the old "smooth visuals" does not solve the issue because then you get the "why are my shapes not working, the visuals show they should collide --- yeah because the visuals are lying just to look nice" which is even more dog. If you move your RayCast3D node with the physics step your visuals are correct, everything else is just made up and you would need to force update the node to have the starting position correct. You still can not use an "idle" processing AnimationPlayer or process() function or anything else that is not in sync with physics to move the node.

What could be done is that the debug gets updated when users call the force_raycast_update() function in scripts as there is no code path that makes the debug react to anything there.

from godot.

smix8 avatar smix8 commented on September 7, 2024

Because RayCast3D is a physics using node.

It updates its shape and instance transform with the physics tick that is not necessarily in sync with your frame rate so any visuals get just "normal" physics jitter.

Your animation is changing just the node position every frame while the shape position gets updated on every physics tick.

from godot.

Wyatt-Warren avatar Wyatt-Warren commented on September 7, 2024

I understand, but the issue is I only started seeing this with 4.3. If you open the test project that I provided in 4.2 the effect is not there. Also in the project that I provided, the maximum FPS is set to 60 which is the same as the physics tick rate and despite this, the ray still lags behind it's actual position significantly, but only in version 4.3.

I should also add that you can clearly see that when the ray is jittering or lagging the ray goes between visually colliding and not colliding with the body, yet the actual collision, that being whether the body is displaying red or not, is not changing, meaning the visual is not matching the actual state of the ray.

from godot.

matheusmdx avatar matheusmdx commented on September 7, 2024

This seems to have started after #82599, compiling with this pr applied and the fix #90800 starts the desync

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.