- Home /
Jump Force gets added up with repeated input and causes character to fly off
I've created a game where objects(set as prefabs) spawn beneath the player. In order to make sure tat they spawn beneath the player and not mess up the player or the platform by merging with them I decided to make the character jump whenever the spawn is triggered, for that I have used:GetComponent<Rigidbody>().AddRelativeForce(Vector3.up * jumpForce);
But whenever there is a repeated touch the Player goes higher than normal since the force gets added up twice, I do not want it to do so. How would that be possible? Examples with code would be very appreciated :^)
Your answer
Follow this Question
Related Questions
Player sometimes lags and jumps very high when instantiating prefab 1 Answer
Increase force/size the longer input has been held down. 2 Answers
Object after instantiate doesn't apply AddForce 1 Answer
Distribute terrain in zones 3 Answers
Projectile not moving properly in top down 2d shooter 2 Answers