What Equation Should I Use for Bouncing on a Trampoline in a Video Game?

  • Context: Undergrad 
  • Thread starter Thread starter Subliminalman
  • Start date Start date
  • Tags Tags
    Trampoline
Click For Summary

Discussion Overview

The discussion revolves around the physics and programming involved in simulating bouncing on trampolines in a video game. Participants explore the appropriate equations and principles that govern the behavior of a character bouncing off a trampoline, considering factors like angle and elasticity.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Homework-related

Main Points Raised

  • One participant seeks guidance on the equations needed to model the bouncing effect based on the trampoline's angle.
  • Another participant suggests that the bounce could be modeled assuming completely elastic collisions, where the angle of incidence equals the angle of reflection.
  • There is mention of the need for vector analysis if the collisions are not perfectly elastic, while also considering the effects of gravity.
  • Some participants recommend that the original poster consider posting in a more specialized forum for programming or technology for additional help.

Areas of Agreement / Disagreement

Participants generally agree that the question involves physics principles, but there is no consensus on the specific equations or models to use. Multiple competing views on the assumptions regarding elasticity and the approach to modeling the bounce remain unresolved.

Contextual Notes

Assumptions about elasticity and the effects of gravity are not fully defined, and the discussion does not resolve the mathematical steps necessary for implementing the proposed models.

Subliminalman
Messages
1
Reaction score
0
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.

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
 

Attachments

  • example.jpg
    example.jpg
    5.2 KB · Views: 570
Physics news on Phys.org
You might try the Computer and Technology forum instead of General Physics. You should have the best chance of getting help there!
 
Welcome to PhysicsForums!

Since you seem to grok code, I presume that you're more interested in the physics of the situation, rather than code that models the physics.

If you make the assumption that the bounce is completely elastic (not a bad assumption, for the lulz) the angle of incidence will be the same as the angle of reflection, as measured from the normal of the plane (or, in your case, trampoline):
http://en.wikipedia.org/wiki/Collision
http://en.wikipedia.org/wiki/Deflection_(physics)

If you make the assumption that you don't have perfectly elastic collisions, you have to do some vector analysis (all while dealing with gravity, as I presume you are).
 
Last edited:
Yes, I agree that a physics forum is probably better for this particular question, since it's basically a physics question. If the OP wants to get into discussing the programming code specifically, the "Programming & Comp Sci" forum would be the place for that.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 32 ·
2
Replies
32
Views
12K
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
8
Views
2K