Sometimes my car crashes for no reason at all

Wednesday, August 20, 2008

This will only be of interest to a small group of people using Bullet for vehicle physics. I actually spent a few days tracking this bug down so I am posting it here just in case it helps somebody else.

If you are trying to create a "sensor" or "trigger" type object using Bullet so you can detect if your vehicle enters or exits an area, you might notice your vehicle's wheels colliding with the otherwise invisible, "non-collideable" sensor. Read more about it here.

5 comments:

Anonymous said...

I'd actually had a similar problem working on our platformer, and ended up coming up with the same solution.

Thanks for the post!

Brian Cronin said...

It is an issue with raycasts in general so I can see how you would have the same problem.

Should raycasts even "see" no contact bodies? I guess there may be times when you would want them to, but most the time you wouldn't.

Anonymous said...

I'm sure there are some instances where having rays detect non-contact bodies, but they probably are outnumbered by the instances where you don't want your rays to detect them.

Your solution is probably the best without actually modifying the library.

Also, I just wanted to say that I am so very impressed by ZeroGear! You guys are doing a phenomenal job...you guys should be a shoe-in for at least one award at this year's IGF.

I'll be at the ceremonies in March so if you make it there, I owe you a drink. ;)

I look forward to more posts!

Best,
Julian Spillane

CEO,
Frozen North Productions, Inc.

jspillane@frozennorthproductions.com

David Marsh said...

Thanks Julian, I hope we see you there!

Brian Cronin said...

I agree that the actual library should not be changed. I do hope they change that btDefaultVehicleRaycaster class though.

I will take you up on that drink. :)