Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit) (-2)

!!!!!!!!!!!!!!!!!!!!!
For mobile inputs use this:
       
private void FixedUpdate() { 

            Vector2 dir = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); //Custom Input

            if (Mathf.Abs(dir.y) == 1) {

                animator.SetInteger("Direction", dir.y > 0 ? 1 : 0);

            } else if(Mathf.Abs(dir.x) == 1) {

                animator.SetInteger("Direction", dir.x > 0 ? 2 : 3);

            }

            dir.Normalize();

            animator.SetBool("IsMoving", dir.magnitude > 0);

            rb.velocity = speed * dir;

        }
😎👌

(1 edit)

in what language is this? C#?

Looks like a Unity Engine script. So yea, C#

thanks :)

Thankyou so much bro.