Search Unity

Bug Target group and camera aspect ratio

Discussion in 'Cinemachine' started by 00christian00, Oct 7, 2020.

  1. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I am trying to use target groups and I noticed that some target are off camera.
    I noticed the gizmo show always the same frustum regardless of the game view aspect ratio.
    Using version 2.6.3.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Yes, the yellow gizmo will show the bounding shape for the group, based on the vcam's position, and does not reflect the aspect ratio. If some group members are offscreen, that might have to do with the limits you set in the vcam. Can you show the vcam inspector?
     
  3. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I tried various settings but it seem some targets are always off screen.
    Also when a new target is added at runtime when new enemy are spawned, the camera seem to go in the opposite direction before framing the new target, it's like it first aim at the sky and then go down to the enemy while still failing to properly frame it.
    upload_2020-10-8_11-10-14.png
     
  4. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I think I know what's the problem. It has reached the maximum FOV.
    It is quite hard to setup, much more than the single target scenario.
    Is there any guide on how to setup a 3rd person multi target camera?
    All the examples I found were using a top view camera which is a lot easier to make it work, has a back camera scenario been tested?
     
    Last edited: Oct 8, 2020
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    The setup can't work for any arbitrary configuration. What if the targets are completely surrounding the camera? There is no setting in that case that will see all the targets.

    There are many different possible situations, and you need to understand what the limits are of yours. Where will the targets be able to go relative to the camera? How would you like the camera to respond? Try to first describe it with words.