access Input.GetButton key name

Hi!

I am again wondering how to access Input.GetButtons key name(string!)

For an example:

private var str: String="Press "+Input.GetButton("Action").key.name+" to start!";

It should return: Press Space to start!

I just want to make sure that it automaticaly correct if user changes controls…

Have anyone made smthing like this one?

Thanks in advance!

This is just a guess, but perhaps the ground check for that class only checks if the character is very close to the ground? That is, it might be possible for it to get a few positive ground checks within a few frames before it "leaves" the ground, and would "Jump" multiple times before leaving the floor. Along with doing a "minimum time for next jump", you might also be able to check upwards velocity to make sure the character is not already rising.

1 Answer

1

No, but you can vote for it.

Wow I think it's really that! I reduced the radius in which the controller checks for colliders overlap and indeed it lowered the jump height. So I guess in this case I should enable to jump only with the jump button to ensure the accuracy. Thank you very much! :D