This project is read-only.

Problems with the car wheels and TriangleMeshObject

Nov 21, 2009 at 11:46 AM



I've just started playing around with this library and one of the first things I tried was to remove the heightmap and use a custom .x model as a Triangle Mesh Object instead, this seems to work fine for the cubes and spheres, however the car seems to have problems, the wheels sink though the mesh, and the the chassis stops the car falling through the world.  Is there something obvious I could be doing wrong?


Here's a few screen shots:






Nov 22, 2009 at 12:20 PM

Hi e66

In the constructor of the car is a "wheelRadius" variable which determines the length of the rays cast out for collisions (I believe)

Try increasing the value from 0.45 to 0.8 or something

Hope that helps


Nov 22, 2009 at 3:10 PM

That's not the problem, but thanks for the reply :D


The thing is all I have changed is removing the height map and adding a TriangleMeshObject.  So all the settings for the car should be fine, cos they were already set up nicely for that car and I've not changed them.


Also it seems that all the shapes can handle the collision with the TriangleMeshObject nicely.  It just the wheels that have the problem, it seems that the thing that is stopping the car from falling through the TriangleMeshObject is the two boxes that make up the chassis of the car.

Nov 23, 2009 at 7:31 AM

damn, worth a shot.

I gotta say I did the opposite to you - I had a trianglemesh which I had an utter mare with and ended up using a heightfield.

It might be worth chasing the wheel code that does the ray tracing to see what collision results its getting.

- does the car actually drive? I'm guessing it doesn't in which case collisions on the wheels probably just arent working.

Nov 23, 2009 at 3:38 PM

guys... this codeplex-discussion-place is CLOSED :D


which version of JigLibX do you use?

Nov 23, 2009 at 4:19 PM

Judging by the Window Title in screen shots, I'd say the latest. and I use the same

totally forgot this forum was "closed" sry :P

Nov 23, 2009 at 7:28 PM

Latest version.


Where should I have posted?

Nov 23, 2009 at 7:32 PM