Answer the question
In order to leave comments, you need to log in
How to fix the error: The name "imput" is not present in the current context?
here is the code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PleyerControl : MonoBehaviour {
public float speed = 20f;
private Rigidbody2D rb;
void Start () {
rb = GetComponent <Rigidbody2D> ();
}
void Update () {
float moveX = Imput.GetAxis ("Horizontal");
rb.MovePosition (rb.position + Vector2.right * moveX * Time.deltaTime);
}
}
Answer the question
In order to leave comments, you need to log in
Typo:
float moveX = I m put.GetAxis("Horizontal");
Imput - there is no such thing, but there is Input)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question