Q:

iPad Car Race Game

i will be developing a car race application, you will see the car from the top as well as the track (road) on the screen. 
Tilting iPad (using accelerometer) will make the car move in the direction of title but I want to restrict the car movement along the road only. 
In ActionScript 3 we have hit test between the objects, and i could just use the hit test method between the car and the road to keep the car on the track.
How can I do the same in iPad to keep the car on track? Will I be working at a very low level coordinate based logic or do we have something easier in here to avoid the car getting side tracked?
Do you suggest me to look into cocos2D?
It's a very broad question, kindly answer whatever you can instead of de-voting (as happened before), kindly just point out a direction regardless of sorting out an exact/specific answer. Thanks.

A:

Short answer: you will have to calculate this yourself. Pretty much the only function the iOS SDK provides that sort of helps with collision detection is CGRectIntersectsRect()

