|
Post by netzah on Jan 8, 2021 2:45:10 GMT
Hi! If you enter a room while a trigger zoom is returning to previous size (OutsideTriggerRoutine() is running) the coroutine keeps running until you exit the room and then makes the camera jump.
It keeps running because this line on the while loop conditions returns true:
Mathf.Abs(ProCamera2D.ScreenSizeInWorldCoordinates.y * .5f - _targetCamSize) > .0001f
OutsideTriggerRoutine() keeps running a lot of time after exit the trigger (using smoothness 1), so I cant use a zoom trigger near a room without causing the bug.
How can I avoid this?
Thanks!
|
|
|
Post by Luís Pedro Fonseca on Jan 9, 2021 13:51:01 GMT
netzah Combining multiple zoom extensions (TriggerZoom and Rooms in this case) is always tricky because they always end up "figthing" for zoom control. Can I ask why don't you use the zoom feature of the Rooms extension? Cheers
|
|
|
Post by netzah on Jan 9, 2021 16:02:06 GMT
Hi, thanks for your reply. Its because im developing a 2d puzzle game and I use "scale to fit" on every room to show the entire puzzle zone with fixed camera. So this issue happens on zones between that rooms that use trigger zoom to show something on scene.
|
|
|
Post by netzah on Jan 10, 2021 2:02:37 GMT
Sorry I missunderstood your question, I tried to use zoom rooms instead of trigger zoom, but its not the same effect, it locks the camera and doesnt have an influence zone. Maybe could I stop manually the trigger zoom coroutine when a room is entered using callbacks? Thanks!
|
|
|
Post by Luís Pedro Fonseca on Jan 13, 2021 21:58:09 GMT
netzah Not sure I'm following. Can you please share a video or some images to explain what you're trying to achieve?
|
|
|
Post by netzah on Jan 14, 2021 3:56:52 GMT
I made a simple scene to show it. Here is a screenshot of the scene: i.imgur.com/ftBc1OQ.pngAs you can see, I have a zoom trigger near to the room. (The issue happens also with way more distance between trigger and room) In this video you can see how camera jumps on room exit, this only happens if previously been in a trigger zoom: streamable.com/767976I want to be able to use a trigger zoom near a room being sure that camera jump on room exit won't happen. Thank you
|
|
|
Post by Luís Pedro Fonseca on Jan 23, 2021 11:16:40 GMT
netzah Can you please send me (by PM) a small sample project that replicates the issue using ProCamera2D demo assets?
|
|