Open ekaramustafa opened 1 month ago
"I didn't use a physics material. Instead I use the OnCollisionEnter2D method. In there I use similar code to our OnJump method from earlier. So I'm just adding to the Y velocity of the player each time I hit the spring. I've made it a separate script, placed on the spring with a serialized field for spring speed. That way I can make each spring give a different amount of 'bounce' so that I can customise each jump to be however strong I like."
The spring causes you to jump higher, introduce some springs that jump you to certain height.