In the platform example tutorial, there is a section that goes over the behavior when jumping on an enemy. In order to create the effect, when we land on an enemy we test to see if our Y value puts us higher than the enemy, and if so we set Vector Y to -700 this gives us the effect of bouncing off of it.
I am working on a similar thing but for running into solid objects when moving above a certain speed. For example if the player is running and their speed is above 450, I want to have them bounce back a little bit when they hit a wall, etc... I can't just say Vector X -700 as that will only move them in one direction and I need to account for the direction they are running at the time. My thought it to setup a Right and Left action (similar to the enemy AI behavior in that same tutorial) but have it on the player, when they are running normal set it to right, and when it is mirrored, set it to left. Then when they hit an object I test for Left or Right, then have them bounce back a bit using Vector X +/- 50.
Is there an easier way to do this? I had thought I saw a behavior for this at one point using a "reverse" action? But cannot seem to find it, also if memory servers, it was not for the type of behavior I am looking for.
My end goal is that when the player is going to fast and they run directly into an object they bounce back a little bit and maybe trigger an animation (have them land sitting on their butt for a second for example). Any thoughts?