sPOiDar / fvtt-module-stream-view

FoundryVTT module that provides a minimal UI view with automated camera work, ideal for streaming or recording games.
MIT License
11 stars 11 forks source link

[bug] Screen flicker when moving actor using Lock View module. #83

Open Oryan77 opened 3 months ago

Oryan77 commented 3 months ago

Describe the bug When using Stream View and the Lock View module together, Stream View (Automatic Camera Mode activated) doesn't seem to like moving an actor token across the map when a map has the option "Bounding Box" selected in the Scene Config setting. When the token moves across a map, the screen flickers. It seems to occur more when dragging/dropping farther distances. This flicker does not seem to occur in Directed or disabled mode.

Adjusting the Camera Animation Duration to a higher value seems to help a little, but the issue still happens most of the time.

To Reproduce Steps to reproduce the behavior:

  1. Activate Stream View and the Lock View modules.
  2. Go to Scene/Configure/Lock View tab
  3. Check "Bounding Box" (everything else can be default)
  4. Set Stream View camera mode to Activated.
  5. Drag a Player token across the screen and drop it. Stream View client screen will flicker.

Expected behavior Screen should not flicker when moving a token.

JavaScript Errors I do not see any errors.

Screenshots Here is a video of the flickering in action: https://drive.google.com/file/d/1wHt7T0IQsrnc85kbSSBY0DWeotH44WSI/view?usp=drive_link

Checklist

Environment (please complete the following information)

Additional context I ran a lot of tests trying to narrow this issue down. I assume it's an issue with Stream View, but I apologize if I'm wrong. The flicker seems to be a conflict of Lock View trying to keep the screen within the Bounding Box and Stream View correcting itself when it's forced to stay within the Bounding Box.

Oryan77 commented 21 hours ago

Further testing on this issue has convinced me that the flickering has to do with Stream View always centering a Players actor token on screen when Camera Mode: Automatic is set. I think since the Lock View bounding box limits the map position, having the actor token always trying to center itself is causing the flickering .

Stream View wants to center actor tokens on screen even when Camera Mode: Disabled is activated. Maybe having an option in Stream View to completely disable any kind of token centering would resolve this issue?

sPOiDar commented 19 hours ago

I'm not really familiar with the use-cases for Lock View - is the Bounding Box a static value? If so, can you not just set the scene Initial View Position to the same values as you would set in the Bounding Box? Does toggling the Initial View on Camera Disabled setting in Stream View change anything in this interaction?