I want to make my object bounce (like a pogo stick) and have the ability to increase the height of the bounce with a button press (based on the Y linear velocity of the object on collision with the ground). The easiest way I have found to get that working is by increasing the objects restitution >1 on a button press. However, I want my object to only bounce in the direction of the objects angle, but the object is bouncing in odd directions due to (I think) the way the physics works on the hit box of the object.
Is there a way to apply all forces to the object at the objects angle on collision with the ground? If I use the apply force action it wants me to set a value for the force but I only want to change the angle the force is applied at and use the objects restitution and its Y linear velocity on collision to set the value of the force applied.
Alternatively, is there a way to emulate this behaviour by just using the set linear velocity action and setting the restitution to zero? I know I can do that and get the movement I want but I couldn’t figure out how to increase the linear velocity based on the Y linear velocity of the object on collision with the ground.
I hope this is enough information. Let me know if not.
Many thanks in advance,
Sam