Roller coaster physics?
Posted: Wed Jan 06, 2010 12:21 am
Hi there,
I was wondering if anyone would be able to help me.. i've been trying to get my head around this for the past few days.. but with no luck..
I want to create a roller coaster game.. so i will have a track.. and the cart must follow the track exactly and not come off it.. as it's a roller coaster the speed of the cart has to be quite fast.. but everything i've tried always end up with the cart leaving the track and flying off whenever a dip in the track is reached..
The cart is made up of a simple rectangular polygon.. with two circular wheels attached with pin joints to it.. the track is made up of segment shapes.. similar to the moon buggy demo..
Is there a way to 'stick' the cart onto the track?
So essentially... the wheels will follow the path of the track (which is curved), and always stay 'stuck' to it..
If anyone has any ideas or example code i'd be so grateful!
I was wondering if anyone would be able to help me.. i've been trying to get my head around this for the past few days.. but with no luck..

I want to create a roller coaster game.. so i will have a track.. and the cart must follow the track exactly and not come off it.. as it's a roller coaster the speed of the cart has to be quite fast.. but everything i've tried always end up with the cart leaving the track and flying off whenever a dip in the track is reached..
The cart is made up of a simple rectangular polygon.. with two circular wheels attached with pin joints to it.. the track is made up of segment shapes.. similar to the moon buggy demo..
Is there a way to 'stick' the cart onto the track?
So essentially... the wheels will follow the path of the track (which is curved), and always stay 'stuck' to it..
If anyone has any ideas or example code i'd be so grateful!
