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

Assets\PlayerController.cs(51,14): warning CS8321: The local function 'Move' is declared but never used

$
0
0
using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Security.Cryptography; using System.Threading; using UnityEngine; public class PlayerController : MonoBehaviour { public float WalkSpeed; //Private Variables Rigidbody rb; Vector3 moveDirection; // Start is called before the first frame update void Awake() { rb = GetComponent(); } void FixedUpdate() { //Physics steps } void Update() { //Get directional input from the user float horizontalMovement = Input.GetAxisRaw("Horizontal"); float verticalMovement = Input.GetAxisRaw("Vertical"); moveDirection = (horizontalMovement = transform.right + verticalMovement + Transform.forward).normalized; void FixedUpdate() { //Call the Move funtion move(); } void Move() { //Here we define the Move funtion } void Move() { //Rigidbody.Velocity is a method which takes a Vector3 //and controls the speed and direction of the GameeObject rb.Velocity = moveDirection * WalkSpeed * Time.deltaTime; } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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