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 am making an attempt to implement a splash capability for my participant that feels good, however what I’ve proper now form of feels “flat.” What I’ve is fairly easy, like this:

utilizing UnityEngine;
utilizing System.Collections;

public class Instance : MonoBehaviour
{ 
    [SerializeField]
    personal float dashLength = 5;
    [SerializeField]
    personal float dashDuration = 0.2f;

    personal 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 counsel 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 does not simply really feel like my participant is rigidly rushing up after which returning to regular motion. Nonetheless, I’m open to all recommendations.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments