Currently I am making a small video game where a cat is constantly falling through the sky! I want to add in some trampolines that when hit you will bounce according to the trampolines angle.(adsbygoogle = window.adsbygoogle || []).push({});

What equation would I use to perform this function?

I have provided a picture to help illustrate what I am trying to achieve

For all of you programmers out there here is the code that I used so far

if (trampTime <= 0)

{

//trampRotation is in radians

character.velocity.Y = 10 * (float)Math.Sin(trampRotation);

character.velocity.X = 10 * (float)Math.Cos(trampRotation);

}

trampTime++;

if (trampTime > 30)

{

character.trampoline = false;

trampTime = 0;

}

Any help would be greatly appreciated

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Bouncing on a trampoline

**Physics Forums | Science Articles, Homework Help, Discussion**