|
-
M.D.
pinball physics
i've conducted some searches and found some good stuff around here, but its so hard to understand things.
I need to find the point of collision with a circle and a line. I'd love some simple explanation about what does what.
Find the angle at which the ball must bounce off.
Things i think i need to know:
- balls angle of velocity or the slope at which the ball is travelling at
- the walls angle
- the walls length
I've read some stuff on projection but it gets way too confusing quickly, dot product and stuff like that, normals. I have no idea what they are, and after reading through explanations i'm like "what the hell"
here's how i'd imagine i'd go about it
-get angle of velocity
-project this angle onto the line somehow
-find the distance between that point of intersection and the balls centre
-if the distance is less than the balls radius we hit the wall
-place the ball correctly on the line
-compare angles between the wall and the ball
-update the balls x and y speeds by cosing and sining them with the correct angle
-trace "hoorah the ball bounced off the wall"
i pretty much have problems with all of that, especially with the projection, it just makes no sense to me. Please please help a lost soul.
been to metanet (honestly can anyone understand their source files), seen the pinball physics engine made in flash 5, searched the forums, searched for circle - line collision, i have Jobe's pinball example (thats what i've been working off) can anyone just give me some explanations, please.
Also if you are going to give me some advice please don't use mathematical symbols, i have no idea what they are and nice variable names would be good, like:
bad - b = y-s*x;
good - angleVelocity = y-slope*x
i need to know what i'm typing, i have trouble learning from single letters.
Thankyou, and I greatly appreciate any help
Last edited by mr_malee; 03-20-2006 at 08:56 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|