for example :
red lines are the balls , blue are corners
and thanks ,, sorry for my bad english
Posted 31 March 2012 - 05:17 PM
Posted 31 March 2012 - 05:39 PM
Posted 31 March 2012 - 06:32 PM
two objectsAre the blue lines 2 objects or one?
Posted 31 March 2012 - 06:49 PM
if (direction<=179)
{direction+=90}
if (direction>=180)
{direction-=90}
Edited by time-killer-games, 31 March 2012 - 06:52 PM.
Posted 31 March 2012 - 07:01 PM
collision event for the ball object to bounce, try:
if (direction<=179) {direction+=90} if (direction>=180) {direction-=90}
i cant really play with it right now though.
edit:im probably not the best person for this kind of question. i should have noticed that second pair of red lines you had there. D:
Posted 31 March 2012 - 07:43 PM
Posted 31 March 2012 - 07:49 PM
Posted 31 March 2012 - 07:53 PM
ok, first of all you need to know the angle of blue line, you can do this by or making 2 different objects where 1 object has an angle of 45 or 135, or you could just use the image_angle. I'll call it just angle in the code.
The code:
direction=2*angle-direction;
Posted 31 March 2012 - 07:55 PM
Posted 01 April 2012 - 06:09 AM
What went wrong? I tested it on my pc and it worked there.
Posted 01 April 2012 - 08:43 AM
Posted 01 April 2012 - 09:29 AM
Oh, now I see, the problem is that you made the slim walls solid, unsolid them and it works fine.
0 members, 0 guests, 0 anonymous users