Forum begins after the advertisement:


[Part 6] Camera Bounds not working

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 6] Camera Bounds not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16041
    Matus Duschek
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Hello i need help with the Camera bounds which are set up in this part. I am new to this and don’t know what to https://imgur.com/a/LqglkB7
    i have set it up as in the instructions but it completely ignores bounds but it does switch to a different camera.

    #16043
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    From the looks of it, your “Secret Room Cam Bounds” does not have any “Composite Collider2D” from the error sign.
    After you add the composite collider, you should be fine to continue.

    “Check the Used by Composite checkbox on the Box Collider 2D and add a Composite Collider 2D to the top of it.
    Set the composite collider to Is Trigger so that it doesn’t affect collision in gameplay.”

    #16045
    Matus Duschek
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Okay i managed to fix that but now it doesn’t want to switch cameras when i go over to the “secret room” this is the error massage i get

    View post on imgur.com

    i have copied and pasted the code so i don’t think it’s the problem but this is the line the error massage refers to:

    View post on imgur.com

    #16052
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    Hi, I’ve moved this into a separate topic post.

    For your Camera Bounds, can you check the following:
    1. You have more than 1 CinemachineVirtualCamera, Check your cameras and make sure they have the property CinemachineVirtualCamera.


    2. For each camera you have, you have the same number of Camera Bounds. Assign the Cameras to each of the camera bounds respectively.


    3. All Cameras you have are put into the CameraManager (Which should be the parent of your cameras) Script’s “All Virtual Cameras” Array in the inspector.


    Something you can also try to see if they work is to go to an empty scene without the player and toggle 2 different cameras on and off and see if they switch camera views.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: