Quantcast
Viewing all articles
Browse latest Browse all 2891

coding problem

No matter what I do it says "error CS1002: ; expected using UnityEngine; [RequireComponent(typeof(player_motar))] public class player_controller : MonoBehaviour { [SerializeField] private float speed = 5f; private player_motar motar; void Start() { motar = GetComponent() } void Update() { //Calculate movement velocity as a 3d vector float _xmov = input.GetAxisRaw (horizontal); float _zmov = Input.GetAxisRaw(Vertical); Vector3 _movHorizontal = transform.right * _xmov; Vector3 _movVertical = transform.forward * _zmov; //final movement Vector Vector3 _velocity = (_movHorizontal + _movVertical).normalized * speed; //apply movement motar.move (_velocity); } },so I put this on player controller but no matter what I do it says error CS1002: ; expected, but I don't see whats wrong. using UnityEngine; [RequireComponent(typeof(player_motar))] public class player_controller : MonoBehaviour { [SerializeField] private float speed = 5f; private player_motar motar; void Start() { motar = GetComponent() } void Update() { //Calculate movement velocity as a 3d vector float _xmov = input.GetAxisRaw (horizontal); float _zmov = Input.GetAxisRaw(Vertical); Vector3 _movHorizontal = transform.right * _xmov; Vector3 _movVertical = transform.forward * _zmov; //final movement Vector Vector3 _velocity = (_movHorizontal + _movVertical).normalized * speed; //apply movement motar.move (_velocity); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles