🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

basic physic question

Started by
6 comments, last by GameDev.net 24 years, 8 months ago
The ball will go with the wall (30 m/s).
If you would grab the wall (read: stop the wall) the ball would go further 30 m/s.
Advertisement
This will be hard, first, imagine that the ball is a rubber one, that would make it bounce fastly (but not faster than before) but now imagine a iron ball, it would just bounce a little bit, then you have the gravity factor, which wil make the ball go down as well, then you have air resistance.

An advice, you will (i think) never simulate a real world physics like this, try to go for aproxximatly things.

Imagine the perfect material would have a rebound of 1 and other materials would be less, rubber is 0.9 and steel is 0.1, then you would make speed before=speed after * contant

this would be aproxamitly and without gravity or air resistance.

Stay well.

bye

------------------
Bruno Sousa aka Akura
Founder and programmer - Magick.pt
magick_pt@geocities.com
http://magickpt.cjb.net

[This message has been edited by Akura (edited September 29, 1999).]

It's good to be an outcast, you don't need to explain what you do, you just do it and say you don't belong there.
I belive I can remember something about that when two objects collide then the added energy of the two is devided and then the original energy is substituted with this.
Okay, everything is physics works relatively.
If you have only a wall and a ball in this world then the speed the ball hits the wall is the magnitude of the two motion vectors added together. That of the wall and the ball.
Ignoring the y and x vectors, imagine the ball is heading towards the wall with an x vector of 10m/s i.e straight down the positive x plane. If the wall is motionless it has an x velocity of 0m/s so
10m/s - 0m/s = 10 m/s
If it was moving towards the ball at 30 m/s it would be
10m/s - (-30m/s) = 40 m/s
it's - (-30) because the wall is moving in the negative x plane i.e. towards the ball.
If the wall was moving in the same direction as the ball but at 4 m/s then it would be
10 m/s - 4 m/s = 6 m/s
If this sounds too complex, talking in terms of vectors, then say so and I'll get simpler.
Hope this helps.
I see only one right answer here.
Mike, you only one who know physics here

If the wall (wall has infinity mass) moves with speed of 30 and ball with speed of 10, then resulting speed will be 40.

The more complex way will be if wall is affected by this collision (will loose some amount of it's speed). If you interested, i can explain that way.

------------------
FlyFire/CodeX
http://codexorg.webjump.com

Ok just use this equation:

v(wall before collision)*m(wall) + v(ball before collision) * m(ball) = v(wall after collision)*m(wall) + v(ball after collision) * m(ball)

The only problem with this equation is that it ignores about everything (gravity,air resistance and material) but it should work.

but even so i would sugest using this formula but use the constant i said before about the material so you could get a more "cool" effect (if your using in your game a soccer ball and an iron ball and are sent at the same speed to a wall and bounce back the same the player will be disapointed even so that constant is not accuratly real it adds a more realistic aproach

(that what i tried to explain & i din't used physics )

------------------
Bruno Sousa aka Akura
Founder and programmer - Magick.pt
magick_pt@geocities.com
http://magickpt.cjb.net

It's good to be an outcast, you don't need to explain what you do, you just do it and say you don't belong there.
I've got a ball who flying at 10 m/s from right to left and rebounds on a wall.
Under ideal condition its would rebound at the same 10 m/s,right?
But how fast does he rebound if the wall
move with 30 m/s in his direction(left2right)? 30+10 or just 30 or what?
Please answer
Thanx
Wow. I'm new here but I won't post another message here again but I have a question for you. What programming language do you program in?

This topic is closed to new replies.

Advertisement