Hello guys,
I have game where car is driving on the road. Then another sprite is wall and when I hit the wall with car I want the car not beeing able to drive through the wall. I though I got it right but my method sometimes does not work and someties car somehow go through wall.
Car has variable "way". When way is 0 car is going backwards when way is 1 car is going forward. I did that so I know if car goes backwards or forwards. In conditions I have this:
<img src="http://img822.imageshack.us/img822/927/wallcolision.jpg" border="0" />
Most of the time it works. However sometimes car gen go through the wall and I dont know. Do you know what could be the problem?
The wall is not sprite but tiledbackground.
Thank you