reminds me of the time i found a dead body in a mcdonalds ball pit
A new version of this scenario was uploaded on Wed Nov 30 16:53:39 UTC 2011
A more accurate collision checking.
Different balls with different settings
A new version of this scenario was uploaded on Wed Nov 30 16:55:24 UTC 2011
The method 'getMaterialAt(int x, int y)' returns the Material at the given Location.
I initialized some points around the middle of the balls, that have to be checked for Material (In the constructor of tje class Points are the points setted with the method 'setOffset(int [] x,int [] y)').
And when a ball wants to move at a location where solid material is, I calculate the degrees it has to bounce of it.
I need your help again:
I think see where the balls bounce off (in the souce) but what I don't understand is how the balls bouce off with an angle different to the angle they had before.
So, how can the balls know how is the angle of the earth?
A new version of this scenario was uploaded on Mon Oct 15 16:58:07 UTC 2012
First I work out the angle of the ground (from line 284-307).
I go from the angle of incidence 180 degrees in both directions (+1 degree each check) and check if the object is in solid material at the given location or not. (line 287-294). If it's not in solid Material, I remember the Point and store him. (195-304)
And then I calculate the new angle, with angle of incidence is equal to angle of reflection. (308-315)
2011/11/23
2011/11/24
2011/11/24
2011/11/25
2011/11/29
2012/5/12
2012/9/23
2012/9/23
2012/9/23
2012/10/15
2012/10/15
2012/10/17
2013/6/7
2014/8/7