the perfect ball, but how?
I'm quit new in the GameSalad world, but i want to make a little ball brick game and need a good ball for the game. And im a swiss guy so my english isnt the best at all ;-)
So here is the problem:
My ball has a horizontal fix:
When attribute self.motion.linear.Y is greater then -20 but smaller then 20, the ball will bounce at a random(70,120)*(-1)^(random(1,2).
i thought thats ok, but if the ball moves downwards, its possible that he bounce upwards and against the natural motion. the same can happen if the ball move upwards.
so its a bit of luck if the ball bounces in the movement direction or straight against.
hope my description is not to bad at all.
Edit: here is a image, where you can see my horizontal fix rule
http://img408.imageshack.us/img408/7681/screenshot20120217at063.png
Thx very much
Greeetings from the snowy swiss
So here is the problem:
My ball has a horizontal fix:
When attribute self.motion.linear.Y is greater then -20 but smaller then 20, the ball will bounce at a random(70,120)*(-1)^(random(1,2).
i thought thats ok, but if the ball moves downwards, its possible that he bounce upwards and against the natural motion. the same can happen if the ball move upwards.
so its a bit of luck if the ball bounces in the movement direction or straight against.
hope my description is not to bad at all.
Edit: here is a image, where you can see my horizontal fix rule
http://img408.imageshack.us/img408/7681/screenshot20120217at063.png
Thx very much
Greeetings from the snowy swiss
Comments
Got this template allready and also the rules in it, but also with the rules its possible that the movement of the ball change if its upwards to downwards or the other way.
http://forums.gamesalad.com/discussion/35823/perfect-bounce-from-round-objects-the-math-is-killing-me-help
Also just in case its helpful in the future ... (the forum search is useless), .. I use google an dthis is what I put in google search field to find this:
perfect bounce site:gamesalad.com
thx for the link, i will check if its the same problem as mine.
I try to explain it again, hope this time it will be in a better english
So if my ball hits an object and go back downwards to my paddle. on the way downward the horizontal self motion is greater then -20 but less then 20 (explained in my opening post --> horizontal fix), then normaly the ball should bounce away also downwards, as in the real life. But my ball also bouncing upwards, so in fact in the opposite way of natural logic.
the same happens if the ball is on the way upwards.
Hope this time its a better description of my problem
thought it's the same resistution as in the template of GS brick ball, but i will check, thx for the idea
thx for the idea, now my ball motion is a bit more fluently. another problem is solved ;-) but sadely it doesnt help with the main problem.
http://img269.imageshack.us/img269/276/screenshot20120219at134.png
if there's question about the rules, just ask me.
thx for your help
Still, hope your problem gets solved!
For future purposes, try not to resurrect old threads. Thanks!