I have a character which is the parent of a camera, when the character jumps, the camera jumps as well (no surprise). I would like to lock in the camera's Y position when the character jumps so it stays steady and no longer jolts upwards. I've wrote a script to do this but it doesn't work very well as the camera jitters when the player jumps while using it, here it is: EDIT: I should note that this is a third person game.
var originalY;
function Start(){
originalY = transform.position.y;
}
function Update () {
if(altThirdPersonController.isJumping==true){
transform.position.y = originalY;
}
}