Thread: Main Discussion
View Single Post
Old 2009-07-17, 18:43
Darkflame's Avatar
Darkflame Darkflame is offline
Join Date: Feb 2001
Location: Sol, Earth, NL
Posts: 22,496
Send a message via ICQ to Darkflame Send a message via AIM to Darkflame Send a message via MSN to Darkflame
oh, thats a good question.

If you know the height of the platform, and use that formular, it should be fairly simple to support. (so, rather then "when s = the ground " you have "when s = the ground or equals the height of the platform at that point in space/time")

So I dont think getting the ball to bounce off platforms moving up/down is a problem.
a) Look at the balls overhead location (x/y).

b) See if this is where a platform is

c) If true, test that ball height will become less then that platforms height, while not being less then it already. (ie, it will bounce of the platform if the platform is under it, but if the platform is higher, then it can just ignore it and act like it isnt there).

d) If the platform is higher already (so the ball just goes under it), or there isnt a platform, bounce off the ground.

Umm...Ive probably made that sound more complex then it is. But trust me, its fairly easily.

The harder part is determining if the ball hits the side of the platform I think
That is, the ball hits it going horizontaly, rather then merely lands on it and bounces.
__________________ <-- Tells some truly terrible tales.
Phones & Tricorders & Blobs & Bombs & 3D Printers & TVIntros also;stuff
Reply With Quote