I added a 3rd person free look camera to my project and need it to behave like aiming down sights (not really, just zooming in over the shoulder). However, the cameras, when Im switching between them, don’t point in the same direction, so you have this effect that i’ve recorded (its a yt link):
I recognize that this is because moving one camera has no effect on the disabled AD camera and so on and so forth. To fix this, I put this in my code:
This is me trying to set the rotation of the camera I’m switching to, to the same rotation/position of the camera im switching from. Clearly it doesnt work and I smell it’s got something to do with what each camera is looking at. For more information, here is the script that determines which direction the player is facing depending on the camera:
Here, if the ADS camera is enabled, look in the direction the camera is facing etc.
Here is the empty game object that the ADS camera is programmed to look at (it’s a child of the larger player obj):
Both cameras are freelooks, with the ADS having a much smaller orbit and such. Lmk if you need any more information and I hope i was able to explain my issue adequetely. Thank you!