- Home /
Bounce back to previous platform upon collision/trigger
Right now, I have a simple area in my scene, where a character must jump to a specific point. I wanted to add a trigger so that when the player collides into it, he bounces back to the previous platform that he was just on.
I wrote a simple script that when the player OnTriggerEnter into a certain game object, an animation is played (which makes it look like he is bouncing back). While the animation looks great, it also requires a ridiculously longer code than it needs to be, and requires a lot of animations *not to mention that if you don't hit the spots exactly, it looks pretty cheesy and bad.
My question would have to be weather or not there is a more efficient way that I could go at this, or am I stuck doing what I currently am?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613102317im_/https://answers.unity.com/themes/thub/images/avi.jpg)