I've setup custom camera control which overrides the CameraTargetChanged method. I've added the control to Game Control -> Camera control -> Custom controls.

In my battle settings I have following configuration in the 'Look at Menu User' group:
Enabled: true
Look at type: Camera control target
Reset current target: true

Now when I load my battle scene, a combatant of my group is set as camera control target (even though in battle the combatant is not yet selected). For the first time in the battle if I select that combatant, the CameraTargetChanged event does not get called as I was expecting it to (due to the Reset current target option). The combatant does still get selected in the battle.

If I cancel out from the selection, and select the same combatant again, or if I just end the phase and select the combatant in the next started phase --> the CameraTargetChanged event gets called properly.
  • Probably because the combatant was already the target of the camera (e.g. the player).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • But shouldn't Reset the current target-option make the CameraTargetChanged to get called? Somehow I got that insipration from option's description :o...
  • Well, it depends on what already is the target - e.g. if you start a battle, usually the player is still the camera target, unless you change that somewhere :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.