- Home /
Simple jump code?
Hey I need a simple jump code. It is a 3d game that is first person and i have forward backward and side to side and now i need jump. i have a jump animation. I also want it to keep jumping when the spacebar is held down please help!
$$anonymous$$any Documents relating how to script this, it is usually quicker to read other peoples questions that have already been answered first, and as a result, the solution is almost immediate
Searched Jump and found this article
Answer by maxkunes · Jan 03, 2014 at 04:27 AM
You Could Use Rigidbody.addforce or rigidbody.addrelativeforce. But I'm not sure if your character is rigidbody or not...
Sorry If that didnt help much...
Answer by ahmed_sabbir · Dec 16, 2021 at 10:53 AM
set your rigid body gravity scale to 10 or less. this will bring the character faster. now add a xy vector with the speed you want to jump with. use rigidbody.velocity= vector.
Your answer
![](https://koobas.hobune.stream/wayback/20220613125412im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Unknown Identifier maxSlope 1 Answer
Editing the standard FPS to work different 0 Answers
jump animation doesn't play all the way if i am moving 1 Answer
what is the jump axis for if (Input.GetAxis(" ? ") 2 Answers