893 questions
Error CS1513 } expected
Mario Alessandro Yanez
5
Reputation points
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
private float horizontalMove;
private float verticalMove;
public CharacterController Player;
public float PlayerSpeed;
// Start is called before the first frame update
void Start()
{
Player = GetComponent<CharacterController>();
}
// Update is called once per frame
void Update()
{
horizontalMove = Input.GetAxis("Horizontal");
verticalMove = Input.GetAxis("Vertical");
}
private void FixedUpdate()
{
Player.Move(new Vector3(horizontalMove, 0, verticalMove) * PlayerSpeed * Time.deltaTime);
}
Community Center | Discuss the Q&A site | Get started on Q&A
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more