edited July 2019 in ORK Support
Hey Everyone,

I'm making some progress on my game, and ran into an interesting problem with camera positions. I created a scene that has two camera events (both box colliders) that are backed up to each other. Essentially, I want the camera to look at the player in the bar based on where it currently is in the scene. The problem I'm having comes in the form of the 'reset position' option within the camera events, I think. See GIF link below. Apologies for the low quality, converting to GIF isn't the best option from my screen capture. Let me know if I need to re-upload.

I noticed that when the player moves from one camera event trigger to another, there is a point when the collision is happening in both events (as seen in the inspector for "Player Collision". Entered Trigger is for the event on the right, Entered Trigger 2 is for the one on the left). I believe this must be causing issues as you see if I keep moving so that I'm only in the second event trigger, the reset position seems to take effect and the camera returns to where it was at the beginning of the video clip, despite the player being fully within the second trigger.

The other interesting thing is that if I leave the second trigger, the reset position seems to move the camera settings back to that of the first event.

I've worked around this by setting up the triggers so my player is never in both events at once, but I wanted to know if there is something I'm missing that would allow me to change camera angles in small spaces like this with very tight spacing for the colliders. Thanks in advance!

https://imgur.com/Bcu8jwq

EDIT: I've come up with a solution that I'm implementing now. I'm going to have to recompile the source code to account for this situation. I'll post a new comment in this thread detailing my solution once I get it working.
Post edited by Juupo on
  • You can do it simpler, without changing source code.

    1) Make each event activate two variables only when the player is in trigger. When the player leaves the trigger the variables are switched off. First variable is true/false variable which tell the script that player already is in one camera event. Second variable is a variable marking which camera should be used.
    2) Make a global (or scene) variable. It first checks for the true/false variable and if it is true, then it checks for the second variable do determine which camera should be used.
  • Thanks. I'll take a look into this as well tomorrow morning.
  • edited July 2019
    I'll check it out.

    Edit: I should be able to make this behave better in the next update :)
    Post edited by gamingislove on
    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!
  • Awesome, thanks :)
    Haven't had a chance to finish either other workaround yet due to life, but should be able to give it a go in the meantime.
Sign In or Register to comment.