Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Thanks for the reply!!

For sure, I will try tweaking my player movement script but I don't exactly know what the Unity internal input system is. Is it the physics system? changing velocity? Would be great if you could explain it a bit for me :)

Changing gravity sounds really cool. I will surely try integrating it into the game. And obstacles too :)

Really appreciate the feedback. Currently, I'm a one-man team xD So nope, no one's helping me. But I will reach out to you, if I stumble upon any problem.  Again, thanks for the reply

(+1)

Unity has some InputSystem for Character Movement. you want to walk on a 2D plane, so I recommend you following movement:

Try to use the GetAxis.y-Type. You can look for it in the scripting-Documentation in Unity or in one of those endless youtube-vids^^

I think this is the right type. I dunno, I havent worked so much on the UnityInputSystem, but I've worked on some FPS-Controller, and this System was very useful. You can make it like this:

You get the axis you want the character to move, then place the trigger permanent on the axis. (i.e. like you pressed the 'd'-button permanently on the keyboard if you want to go to the right^^). Then, you can add some mechanics to achieve some boost over time by adding Time.deltaTime to the Speed-Value. So you make this like this (script provided)

Maybe its not so efficient, especially its written in the Update-function, but you can build upon this and look what works better for you^^ To build the gravity-mechanic, you can put a trigger on the spacebar or so.

You can achieve this with the "Input.GetButtonDown(KeyCode.Space)"-method.

I hove I could help you^^

private float speed;
private void Update()
{
    float charMove = Input.GetAxis("Horizontal") * speed; //or vertical, you'll have to try it out. This gives you the Axis to move.
    float charBoost = charMove * Time.deltaTime; //to give the Character the Boost over Time.
    transform.Translate(charBoost, 0f, 0f); //The Movement-Magic^^
}

Wow thank you so much. I was struggling with increasing speed over time with my script. This code should really help me tackle that. I'll try it for sure and let you know ! <3

(+1)

I've forgotten to mention that this script would let your Character go to both sides, left and right. If you dont want to do this, then you can clamp the values to one specific Outcome. Or you let the Input away and use a specific value like the Speed. Like the way you want the Character to move^^

Got it, thanks! Also, do you know how to remove the 'trial version' watermark? Im not using any cracked version and im not in China, Taiwan or HongKong.