-
-
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
RigidBody2D is rendered twice if using custom_integrator #56049
Comments
Bug demo fff.mp4 |
3.4.1 and 3.4.2 also affected |
3.4.4 problem still persist and not fixed |
Minimal reproduction project: tests-project.zip Video recording of the above MRP on 3.5.rc (40963cc): simplescreenrecorder-2022-06-14_14.40.12.mp4I'm pressing the left arrow key intermittently, which is where you can see the subpixel position change occurring. In any case, the sprite never appears twice, but it does flicker due to rapid position changes. (If it looks like the sprite appears twice, this is because monitors have some amount of ghosting, with some having significantly more ghosting than others.) I'm not 100% convinced this is a bug. There are many potential issues I see here:
|
if to set in example if to speak about original example as i understand properly then in case if set_use_custom_integrator(false) than all have to be executed in following order :
But as i see executes following way :
and this is why you see such jumps. I hope i not mistake anywhere. |
Physics tunneling can be mitigated by increasing Physics FPS in the project settings, using larger collision shapes when possible, or using a raycast to check between the previous physics frame's position and the current physics frame. See #9071. |
Hi thanks . I understand that exist a lot of ways to masquerade problem. But in reality main issue that custom integrator executed after physical server modification and not before. Not exist sense to create custom integrator if it executed after physics already applied and frame already rendered. This is really issue which i reporting. In current moment everything works following way . event -> apply forces -> physical server calculate physics -> rendered -> execute custom integrator -> render again. But in my opinion have to be following way : event -> apply forces -> custom integrator -> physical server calculate physics -> render |
I found out this is a duplicate of #11925. |
Godot version
3.4 stable
System information
Arch
Issue description
When used RigidBody2D with self.set_use_custom_integrator(false) . In accordance with documentation it means that used internal integrator and after it used additional integrator from _integrate_forces.
Problem that engine automatically render scene after internal integrator and one more time after _integrate_forces. Due it in some cases appears sprite flickering.
I created small project which illustrate problem.
To see issue need to start scene and press and hold button left icon will start to move and in one point . Sprite will reach point on screen where start flickering. It means that scene rendered once after exit from internal force integrator and one more time after exit _integrate_forces.
Expected that render of RigidBody2D will start only after finish _integrate_forces if it is overridden and not between internal and _integrate_forces
Steps to reproduce
Minimal reproduction project
tests.tar.gz
The text was updated successfully, but these errors were encountered: