Hi there,
I'm creating a RTS game, where I have selectable buildings and the ground. I want the camera to be draggable at all times (except when handling 2D UI, but that's out of the topic), and selection on elements toggles (if you click an unselected item, it selects, if you click it again, it is deselected). It doesn't matter if I click an object, if I drag the camera, the camera dragging should be attended. How should I do this?
My current implementation:
I have 2 main layers: ground & entities. I set up my UICamera to handle events of entities layer, and I set my CameraController gameobject as the fallThrough, that actually handles camera dragging (as described here:
http://www.tasharen.com/forum/index.php?topic=214.0) on the ground layer. So, I thought about a ForceFallThroughHandling() when my entity (gameobject on entities layer, that is handled by UICamera) hits OnDrag, so that the control is "gained" by the fall through listener.
Is this correct? There's a better way?
Thanks a LOT!