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().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 :^)
↧