Hello!
I have a tilemap that I’d like to scroll inside a popup.
Not sure how I should handle the camera (via rendercam - so this is a question for @ross.grams or anyone being experienced with rendercam)
I tried two approaches:
Approach 1 (the dirty one? I don’t know)
1/ I keep the focus on the main_scene (monarch - not important here but just to mentioned it)
(not sure which box I should have checked so… I checked both )
2/ In the main scene scripts, I add the same condition here and there to make sure all the interactions are disabled (except the camera scrolling) if the popup is displayed above. And then, since the tilemap is in the world view, I can scroll it using the main scene’s camera (rendercam).
This approach is not super elegant but more natural to me (because it’s not rendercam-specific) and seems to work fine (so if I can’t find anything better. I’ll go for it), but this is probably not the best option in terms of flexibility/maintainability/etc. (if I add new interactions, use the popup in different contexts/scenes etc.)
Approach 2
In this case, I’d like to have a camera in the popup collection.
1/ I disable the focus (monarch - not important here but just to mentioned it)
2/ I copy the camera game object containing the rendercam script (and rename it, just in case)
So I have a similar camera object in the main_scene collection and the popup collection.
3/ But… looks like there is a conflict somewhere (I’m probably not supposed to have 2 rendercam scripts running simultaneously)
To be honest, I’m not really sure what I’m doing with the second approach, but I feel this would be cleaner if properly executed (maybe I’m wrong though).
What is the best approach/method to scroll the camera inside a popup?