Hi, I’m wondering how any of you would approach doing something where you could limit the angles around the x-axis of a freelook camera? I’m trying to achieve something akin to looking through a keyhole or a grate, and cinemachine has been great so far but I’m running into trouble with this. I tried limiting the axis via the SetThresholds function but it appears that is done in world-space, and I’m really looking to do it in local space as part of a prefab. I’ve thought of just adjusting the bias value and doing the clamping on my own before I set it, but I was wondering if there was a better way or maybe a different direction or starting spot that I hadn’t thought of. Any help is much appreciated!
1 Like
Ok, had a thought this morning that turned out to work. I just added a piece to my script that sets the thresholds, to also change the bias heading based on the root transform’s rotation. Worked beautifully. Replying here for prosperity and I suppose to share the knowledge. Thanks for making such a great camera system guys, I love it!
3 Likes
Thanks, that helped a bunch!
1 Like