How to make a 2D "trampoline"?

I’m trying to make a sort of bouncy mushroom my player can jump on and then bounces in the direction the mushroom faces. I’m not exactly sure how to set this up. Do you guys have any suggestions about the easiest way to do this? Here is a video explanation of what I’m talking about: Fez 2D/3D experience - YouTube

Any help is appreciated, thanks guys.

Sounds like you would use the OnCollisionEnter function and then check the relativeVelocity against a threshold (to see if we’re landing from a jump) and then bounce the player.

If you’re not using rigidbodies you will have to use a different method.

Haha yeah I v enountered that problem before :smiley: the easiest way is a Trigger around the Mushroom and put
“OnTriggerEnter” add.force z -1000 and
On Trigger exit z +1000
the z -1000 will make the player jump up every time he hits the ground. Whenever you want to stop this, you simply do +1000.
You might have to adjust the force value to your needs and play an animation so the User gets a feedback that the mushroom is actually bouncing but this simple trick will do the job :wink: