flame icon indicating copy to clipboard operation
flame copied to clipboard

`MoveEffect` with noise does nothing on some platforms

Open spydon opened this issue 1 year ago • 3 comments

What happened?

On some platforms the "Shake effect" does not have any effect (or very little effect).

What do you expect?

That is should work deterministically on all platforms.

How can we reproduce this?

The "Shake effect" is added to the camera by doing this:

        camera.viewfinder.add(
          MoveEffect.by(
            Vector2(5, 5),
            NoiseEffectController(
              duration: 0.2,
              noise: PerlinNoise(frequency: 400),
            ),
          ),
        );      

You can also just run this example, where you can see that it doesn't work in Firefox, but it works in chrome: https://examples.flame-engine.org/#/Collision_Detection_Raycasting_Max_Distance

What steps should take to fix this?

No response

Do have an example of where the bug occurs?

No response

Relevant log output

No response

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

Web

Other information

It's a bit unclear which platforms are being affected, some have been reported here: https://stackoverflow.com/questions/78551176/flutter-flame-camera-shake-effect-not-working

Are you interested in working on a PR for this?

  • [ ] I want to work on this

spydon avatar Jun 11 '24 14:06 spydon

@luanpotter did you have a chance to take a look at this?

spydon avatar Jun 11 '24 15:06 spydon

No, I didn't. Is it because of fast_noise? If so I can try to investigate later this week.

luanpotter avatar Jun 11 '24 15:06 luanpotter

No, I didn't. Is it because of fast_noise? If so I can try to investigate later this week.

I have absolutely no idea why, but it might be fast_noise. I'll assign you to the issue. :)

spydon avatar Jun 11 '24 15:06 spydon