Closed HiIAmBarney closed 3 weeks ago
Hey @HiIAmBarney . I added some safety checks. Here's the new version. It should work fine now.. Thanks again for reporting. If you have any issues let me know. Good day.
There IS in fact an Issue with this. When I switch rooms now, the camera Zooms in (and stays Zoomed until I leave the PCamRooms influence), even though the Zoom factor is set to 1 within the Node. I added some Screenshots, though, pardon my placeholder Art, it's from a Game Jam I participated in, that got scrapped mid-project, I am working on realizing it.
This is the Room 1 (In-Game)
This is the Room 2 (In-Game)
This is the Room 2 (In_Editor)
Edit: Don't mind the Debug Velocity and Positional Values, these are not hooked up atm.
I'm not really clear with how you intend this to work so pardon me if I'm wrong. I've noticed the height of room 2 is 192px. I made it so that the rooms never show what's outside their boundaries. In this case the room automatically adjusts the PCam zoom level in order to fit its height to the screen to avoid showing what's outside its boundary and its zoom factor becomes relative to the new zoom level. To avoid auto zooming, the rooms width and height need to be equal or more than the viewports width and height. Try setting both rooms the same height maybe?
That makes A LOT of sense. Thanks, King! Your Asset will be invaluable for my Progress, I'll pray for your good fortune and certainly praise your work within the Credits.
Thanks mate! wish you luck.
Describe the bug Freeing a Scene with a PCamRoom Node throws an Error: "Invalid access to property or key 'global_position' on a base object of type 'previously freed'."
To Reproduce Steps to reproduce the behavior:
Expected behavior The newly instantiated Scene should have its PCamRoom Node overwrite the current PCamRoom Node or freeing the previously instantiated PCamRoom Node should safely disconnect on leaving the tree.
Desktop (please complete the following information):
Additional context This is a follow-up issue on the PCamRoom instantiation issue.