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
Unity 5: AddForce Increases power when already being pushed towards a collider. How to make stop? 1 Answer
rigidBody.addforce doens't work like i want it to 1 Answer
Player in Unity refuses to Jump 0 Answers
My 3D character is flying up when I jump 1 Answer
Rigidbody is not Jumping while Moving 0 Answers