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 PlayerMove : NetworkBehaviour {
- // Update is called once per frame
- void Update () {
- // Als de player niet de local player is wordt de update niet verder uitgevoerd
- if (!isLocalPlayer)
- return;
- float h = Input.GetAxis ("Horizontal");
- float v = Input.GetAxis ("Vertical") * 0.4f;
- transform.Rotate (new Vector3 (0, h, 0));
- transform.position += transform.forward * v;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement