I managed to get the hit test tutorial working without any hitches but as soon as I combined it with my original code, the smooth collision detection effect was lost. This is down to the fact that when the car turns, some of the 'hitTestPoint's still = 'True' (remain within or on the 'barrier') This is forcing the car to remain at a set coordinate.
To fix this, I will need to amend the script so that when the first 'hitTestPoint' contacts the 'barrier', it either bounces the car off a little or I find away of preventing other hit tests until the car has cleared the boundary and pulled away so it is not an issue.
To confirm today's progress: I managed to work through Chapter 11 of my book Real-World Flash Game Development (See Annotated Bibiliography) and produced a mouse-controlled car with hitTestPoint collision detection, then went on to merge and adapt this new code to suit my game build (v3) - not perfect but it's a start!
No comments:
Post a Comment