Game Creation Mastering Development

Unity – move with WASD in the way the camera is facing

I have this C# code for rotating the camera with the mouse: public float mouseSensitivity = 100.0f; public float clampAngle = 80.0f; private float rotY = 0.0f; // rotation around the up/y axis private float rotX = 0.0f; // rotation around the right/x axis void Start() { Screen.lockCursor = true; Vector3 rot = transform.localRotation.eulerAngles; rotY […]