Answer the question
In order to leave comments, you need to log in
How to limit a Unity2D character?
In general, I wrote a small toy, but it is so-so.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Run : MonoBehaviour
{
public float speed = 0.01f;
private void Update()
{
transform.position += new Vector3(0, speed, 0) * Input.GetAxis("Vertical");
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question