-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
Camera oscillation using the new API #2574
Comments
I'm reporting it because I think it's an issue due to the new camera API (mainly because it doesn't occur when the camera doesn't have to move & it wasn't occuring with the old API). But if you don't think so, feel free to close the issue. |
@Skyost can you swap the assets with some placeholder assets and share a reproducible example? Or even a stripped down example with just simple shapes? I am suspecting that this jitter wasn't visible in the old camera because in your videos, the old camera isn't moving horizontally. As a workaround, you can have a intermediate |
Yeah, sure, sorry for the delay. I'll do that on my free time, on wednesday. Btw, it's not moving horizontally because of #2564. |
@Skyost just tested our the example you shared and was able to reproduce the issue. Lucky for you #2572 fixes this. So next release of flame should fix this issues. It was happening because of the default priorities of camera component and the component it was following. Setting camera on a higher priority value would have been an ideal fix. But setting the whole world to a negative priority works too. Not sure if you were trying to fix this exact problem with that PR @wolfenrain?🙂 |
Yep,that was the exact reason why. The camera has to always do it's thing AFTER whatever world it is looking at |
Great ! Then I think this issue can be closed safely 👍 |
Current bug behavior
The camera seems to oscillate when following a movable component.
not.working.mp4
On the above video you can see that's the camera movement is not fluid. There seems to be a delay between the player position update and the viewport position update.
Expected behavior
The camera should behave like before (ie. no oscillation).
working.mp4
Steps to reproduce
Okay, so it's a little bit hard to tell you how to reproduce this bug because I can't share the assets I'm using. But, here's what I've done so far :
PositionComponent
(with a velocity vector that updates its position).Flutter doctor output
More environment information
The text was updated successfully, but these errors were encountered: