Hey again guys
I know the title seems a bit simplistic but thats the trouble Im having. Its not that I cant do it - because I can, but the problem lies with not going directly 90 degrees
Ill explain what I mean and give you the .fla to see for yourself
I have this ball which I want to move in one direction by itself. It will keep moving in this direction until it makes contact with the movie clip 'boundary'.
If the hittest is true then the ball will then rotate 90 degrees, and will continue to do so on and on and on
Now the problem (actually two when I think about it):
I used pretty much the same code I did for mine and Ostils cargame (theres a thread in this forum) and just modified it to work the way I needed it to.
1) The first problem is that the ball doesnt turn a perfect 90 degrees mathematically, it just looks like it does. This is a problem because if you let it run, eventually the ball will go on angles and such
2) When the ball hits the wall, it gives a slight bounce back, and thats a problem when it hits near a corner because it will bounce back and hit the other wall (sort of hard to explain but you can see for yourself)
So yea, if someone could help me out with this, by showing me what Im doing wrong and how to take the bounce of my hittests it would be appreciated :)
The code is in the ball movieclip - *attaches file*
Thanks guys :)
