03-31-2009, 08:02 AM,
|
|
a_m0d
Junior Member
|
Posts: 13
Threads: 3
Joined: Mar 2009
|
|
Problems with collision checking
Hi,
I have discovered a bit of a bug in the collision detection, resulting in the car being "submerged" in the ground. Please look at the screenshots to see what I mean (Paul Ricard track, using the G4):
http://farm4.static.flickr.com/3662/3399...bd.jpg?v=0
http://farm4.static.flickr.com/3573/3399...30.jpg?v=0
http://farm4.static.flickr.com/3421/3400...32.jpg?v=0
These images are the result of getting airborn and then hitting the ground quite hard (bit of a stress test). The were taken at the start position of the track - the jump was made from on the right of this position, where there is a bit of a ramp to jump off.
|
|
03-31-2009, 08:49 PM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
You know, it's funny, I was just thinking that this could happen the other day, but hadn't tried it. There are two problems:
1) if the car is moving down really fast, it's possible for the wheel to get through the ground before the collision detection sees it, and then one or more wheels are just stuck there
2) if the car has a lot of downward momentum, and it causes the suspension to run out of travel, the suspension bottoms out but provides no further force and the car sinks into the ground momentarily
For 1 the way to fix this would be to make sure to check for collisions along the line formed by the current wheel patch contact position minus the previous wheel patch contact position, and force it to stop at any barriers.
For 2 there are a couple of options:
a) make all suspensions have (effectively) infinite travel regardless of what is in the .car specification -- would cause the car to very briefly go slightly under the ground and then bounce up some
b) make a "bumper" so when the spring bottoms out a much higher K spring kicks in -- a good option but can cause the car to really bounce high in the air after a big landing
c) if the suspension bottoms out, enforce staying on the ground by just moving the car up as needed -- this seems like a good option, I can't see any real problems with it but I haven't thought it through very far
|
|
03-31-2009, 11:47 PM,
|
|
a_m0d
Junior Member
|
Posts: 13
Threads: 3
Joined: Mar 2009
|
|
I think that this is a mixture of the two cases that you mention, because I noticed that I can also travel through some of the barriers when I get airborne. Option c seems quite good, but how realistic will it look? A car should still bounce back a bit after hitting something - will this option still allow the suspension to work and bounce the car back up again?
|
|
04-01-2009, 03:30 AM,
|
|
slowDan
Junior Member
|
Posts: 21
Threads: 1
Joined: Mar 2009
|
|
a_m0d Wrote:Option c seems quite good, but how realistic will it look? Its sounds like the best option available. In reality, once you run out of suspension travel you start soaking up the energy with the metalwork. Which usually ends up with a large repair bill! (see Dukes of Hazard for examples :wink C would allow the suspension to provide any bounce and instantly remove any excess energy.
|
|
04-02-2009, 09:17 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:OK, I took my first cut at fixing this in R2394. How does it look? while you are doing collision detection, can you look at extending the collision box to include the wheels for open-wheel vehicles? that would make driving the F1 car so much more fun.
--alex--
|
|
04-03-2009, 06:46 PM,
|
|
a_m0d
Junior Member
|
Posts: 13
Threads: 3
Joined: Mar 2009
|
|
Collision seems to be better now - no more submerging. However, I can now fall right through the track when I flip the car over - this seems to happen on the track, as well as when I hit a track barrier upside down.
|
|
04-03-2009, 11:34 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
joevenzon Wrote:I tested it with the open-wheeled cars and they seem to all work perfectly as I'd expect, except the T73... can't figure out why. thanks joe, driving the f1 now is a completely different experience. haven't looked at the t73 yet, but i'll do it as soon as i get bored of bouncing off the guardrails at monaco...
--alex--
|
|
|