|
Post by demimarco on May 27, 2021 9:17:13 GMT
Hi there!
Loving Pro Cam 2D so far!
Was wondering if there's an easy way to use the Z axis for zooming instead of the FOV...? I'm using a perspective camera and my scene is set up with different elements at different depths along the Z axis. With FOV zooming I'm losing the parallax effect during zoom ins and zoom outs.
I made a couple extensions for additional functionality, but I'm not sure if this is possible and how I would tackle it. Is there a particular reason why it isn't supported at the moment?
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 9:22:03 GMT
demimarco There's a "ZoomWithFOV" option on the main component. You might want to disable that. Let me know if it works for you.
|
|
|
Post by demimarco on May 27, 2021 12:08:01 GMT
Oh my god, how did I not see this! To be fair, my main cam was set to orthographic when I added and set up the PC2D component, and once I switched to perspective, I didn't realize this new option became available! Thanks for the quick reply, it all seems to work as expected now
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 13:42:24 GMT
No problem! Yeah, it's pretty easy to miss especially if previously your camera was set orthographic (which hides the option). Let me know if something else comes up. Cheers
|
|
|
Post by demimarco on May 27, 2021 14:01:11 GMT
On a related note... when I use the Trigger Zoom, the camera will always first jump to the camera Z position that was set at the start of the game. It will ignore any movement on the Z axis the camera has done since then. Only if I use the ProCamera2D.Zoom function first to zoom to a specific value, will the Trigger Zoom then respect this as the "initial" value to ease back to. However, the Zoom function on its own is a bit unintuitive to use, as I have no way to test anywhere what that specific zoom level will look like, whereas moving the cam along the Z axis to test zoom levels (and then setting it to that) is straightforward.
Do you have any thoughts on this?
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 14:08:01 GMT
demimarco You can look into the SetScreenSize method if the Zoom method doesn't suit you. Let me know if it works for you.
|
|
|
Post by demimarco on May 27, 2021 15:35:04 GMT
Thanks! Could I also simply call CalculateScreenSize after doing any manual adjustments?
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 15:41:40 GMT
demimarco Yes, if you're doing manual adjustments you have to call that method.
|
|
|
Post by demimarco on May 27, 2021 17:02:28 GMT
Perfect, thanks!
|
|