Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

hello i wanted some help with my rigidbody camera movement

$
0
0
i was following a tutorial (because im new to unity) and when i went to go test it, it said there were "Complier errors" and it said it was in this script: public class MoveCamera : MonoBehaviour { [SerializeField] private float sensX; [SerializeField] private float sensX; Camera cam; float mouseX; float mouseY; float multiplayer = 0.01f; float xRotation; float yRotation; private void Start() { cam = GetComponentInChildren(); Cursor.lockstate = CursorLockMode.Locked; Cursor.visible = false; } private void Update() { MyInput() cam.transform.localRotation = Quaternion.Euler(xRotation, 0, 0); transform.rotation = Quaternion.Euler(0, yRotation, 0); } void MyInput() { mouseX = Input().GetAxisRaw("Mouse X"); mouseY = Input().GetAxisRaw("Mouse Y"); yRotation += mouseX * sensX * multiplayer; xRotation -= mouseX * sensX * multiplayer; xRotation = Mathf.Clamp(xRotation, -90f, 90f); } } thanks, and greetings, cooper

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>