Does anyone know how to make a block player in unity jump on ground?
UPDATE: OMMMMMGGGGG IT WORKS!!!! SORRY IF I WAS A PAIN IN THE BUM
If your player gameObject has a rigidBody attached to it, the simplest way is probably to apply a force with an upwards direction:
gameObject.GetComponent<RigidBody>().AddForce(Vector3.up , ForceMode.Impulse);
This will inject an “impulse” of vectorial magnitude = 1 in the up direction!
You’re asking for a full script because you failed to Google it yourself. You said you looked at tutorials but nothing works. It’s not that the scripts doesn’t work. It’s you not being able to make them work.
You should check scripts / tutorials other have made and try to understand them and make them suit your needs. Nothing is magically gonna work for you, you have to put in some effort. You can’t just go around Googling scripts and then scraping them all into one project. If you don’t understand those scripts you should go back to basics.
Or if something doesn’t work don’t immediately quit on it. Stay persistent and try to find the bugs. Why didn’t the tutorials work? Bugs? Errors? You can’t just try a script and if it doesn’t work move on.
If you are in desperate need for a tutorial on character movement:
He has some nice tutorials about character movement.
I also recommend to check out this channel:
They are currently collaborating on a RPG.
But before all that; learn some C# before attempting to make a game.