First off, I don’t have much scripting experience so please bear with me.
I need to have a camera follow an object but just in the translate x, and z axis. It cant rotate or, go up and down (y axis) with the object. I tried parenting the camera but I am unable to limit the rotate, or y value.
How would I do this?
So you want to clamp the y value in between certain values?
Mathf.clamp
Thanks, that looks like something. How would I use that? Do I still parent the camera under the game object and then clamp out the rotate and y value?
Edit: when I mean follow, if the player is at 10, 20 (x,z) The camera should also be at 10,20(x,z) the camera needs to be in the exact position that the player is at all times, but the rotations and y should not be affected.
You see I am trying to make a minimap camera follow my character but not rotate when he turns around or jumps.
I found a great set of scripts on the asset store created by Adam Mechtley called Maya Extensions. Among other useful tools it has an aim contrsaint script which allows me to do what I needed too.