I’m still hammering away at my FPS controller and I think I’m about halfway there.
My checklist looks like this right now:
TO DO:
-Stop clinging to walls mid air DONE
-Ground Check DONE
-fix movement direction DONE
-Sprint DONE
-Lock look up and down past 90 degrees DONE
-Fix jump pad issue. jumpClock allows air control?! DONE
-Create Motion direction DONE
-Set velocity when jumping and walking off surface DONE
-Smooth Mouselook
-Set slope / Grip Ground
-Weapon Camera
-Fall / Velocity Damage
-Prevent Motion Telescoping
-Terminal Velocity
-Sound Effects : Jump, Land, Possibly Footsteps
-Optimize
So now I’m trying to figure out why my mouse look is a jittery pile of trash:
void LookControls(){
//Left and Right
mouseX = mouseXSensitivity * Input.GetAxis("Mouse X") * Time.deltaTime;
gameObject.transform.Rotate(0, mouseX, 0, Space.World);
//Up and Down
mouseY += mouseYSensitivity * Input.GetAxis("Mouse Y") * Time.deltaTime;
mouseY = Mathf.Clamp(mouseY, -75, 75);
mainCamera.transform.localEulerAngles = new Vector3(-mouseY, 0, 0);
}
My first thought are to apply a lerp to it, but that seems like it would hinder reaction time and I would have to dig into quaternions, which gives me a stomach ache just thinking about it.
Any suggestions?