Sunday, October 9, 2022
HomeGame Developmentunity - What are some steps I can take to enhance the...

unity – What are some steps I can take to enhance the texture of my sprint?

I’m attempting to implement a touch potential for my participant that feels good, however what I’ve proper now kind of feels “flat.” What I’ve is fairly easy, like this:

utilizing UnityEngine;
utilizing System.Collections;

public class Example : MonoBehaviour
    non-public float dashLength = 5;
    non-public float dashDuration = 0.2f;

    non-public IEnumerator DashCoroutine() 
        // I'm deriving this from one of many kinematic equations (0 acceleration)
        float dashForce = dashLength / dashDuration;
        float elapsedTime = 0;

        whereas (elapsedTime < dashDuration)
            elapsedTime += Time.deltaTime;
            rework.Translate(rework.proper * dashForce * Time.deltaTime);

            yield return null;

I’ve seen others recommend including one thing like a slight digital camera shake, however my query is extra about methods for manipulating the horizontal velocity in order that it would not simply really feel like my participant is rigidly rushing up after which returning to regular motion. However, I’m open to all ideas.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments