Topdown track edge collision
ph33r_zerot
Member Posts: 5
I am looking at making a top down car racer.
The 'track' is a flat jpg image of a grey track with green elsewhere, the car actor has the camera constrained to it and as the car moves and rotates it appears to drive along the track, I have this all working so far.
My question is how to keep the car on track, or 'crash' if you hit the green/grass. Do I need to put lots of straight edged actors around the track as barriers or is there another/better option?
Comments
You can use many straight "edge" actors or try your hand at a custom collision shape: http://forums.gamesalad.com/discussion/90103/video-tutorial-custom-collision-shapes-using-physics-body-editor.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for the link, I'll give that a shot.
While we're here are there any links to setting up more realistic driving physics including drifting/skidding? At the moment I am using move and rotate which looks good on screen but doesn't feel like the right way. Searching on this forum throws up a few results with out of date links.
Check out my series on the physics engine. Click the guru link. You might also pickup a template on one of the third party sites to see how they did racing games.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS