Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.Networking;
- public class Obracanie : NetworkBehaviour {
- public int MouseSens;
- public Transform Hands;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update () {
- Turning();
- }
- void Turning()
- {
- if (isLocalPlayer)
- {
- float xRotate = Input.GetAxis("Mouse X") * MouseSens;
- float yRotate = Input.GetAxis("Mouse Y") * MouseSens;
- Hands.eulerAngles += new Vector3(0f, xRotate , yRotate);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement