Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Whynot-Gaming?

4
Posts
3
Followers
3
Following
A member registered Dec 07, 2019 · View creator page →

Creator of

Recent community posts

(1 edit)

 

thanks for trying out my game only a demo tho sorry about that but, the player movement  is that you are able to turn a 360 =

using Vector2's ----

Vector2 inputDir = input.normalized;

        if (inputDir != Vector2.zero)
        {           
            float targetRotation = Mathf.Atan2(inputDir.x, inputDir.y) * Mathf.Rad2Deg + cameraT.eulerAngles.y;
            transform.eulerAngles = Vector3.up * Mathf.SmoothDampAngle(transform.eulerAngles.y, targetRotation, ref turnSmoothVelocity, turnSmoothTime);
        }

  

using the unity input system ---

 Vector2 input = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));

  after turning you Go that direction  

 transform.Translate(transform.forward * currentSpeed * Time.deltaTime, Space.World);

hope this helps 

p.s using and  blend tree for animation 

running

float animationSpeedPercent = ((running) ? 1 : .5f) * inputDir.magnitude;
        animator.SetFloat("speedPercent", animationSpeedPercent, speedSmoothTime, Time.deltaTime);

(1 edit)

thanks, love to see people giving tips.

Will do with the menus ui.

Give you're FeedBack So that i may learn more and Get Better at game dev. 

(3 edits)

thx man I'm new to game dev. 

I'm going to fix it soon.