Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

KARLUZ

1
Posts
3
Following
A member registered Nov 03, 2020 · View creator page →

Recent community posts

(1 edit)

!!!!!!!!!!!!!!!!!!!!!
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;

        }
😎👌