ramokz/phantom-camera

Framed Mode Deadzone not working when Viewport size differs from Window size

Closed this issue · 1 comments

Issue description

In Framed Mode, the Deadzone does not function correctly when the Viewport size and Window size are different. It seems the issue may stem from small typos in the phantom_camera_3d.gd file.

Currently, at line 762:

var visible_rect_size: Vector2 = get_viewport().get_viewport().size

This uses the Viewport size instead of the visible rectangle. It should be corrected to:

var visible_rect_size: Vector2 = get_viewport().get_visible_rect().size

Additionally, at line 719 the same issue occurs

Steps to reproduce

  1. Set up a 3D scene using the Phantom Camera in Framed Mode.
  2. Adjust the Window size to something different from the Viewport size (e.g. Viewport: 1920x1080, Window: 1600x900)
  3. Observe that the Deadzone does not behave correctly.

(Optional) Minimal reproduction project

No response

Thanks for raising this! It was a typo indeed.