vehicle wrapper wheels bugging thru ground

Hello every one! So i’m in the middle of an car-game that are using the vehicle wrapper for the cars. problem is that the wheels of the cars sometimes (quit often) “bugging” through the ground. sometimes this leads to the whole care going through the ground, and obviously that is an big problem. I know allot of ppl have been having this problem before me, but I can’t find any solution on the problem.

I know that the wheels collision is detected by an ray in in the z-axie, is there any way to increasing the sensitivity on this ray? or are there any other way to increase the precision of the wheel calculation so that they stop going through the ground.

also don’t give me any suggestions on using 6-dof instead, I’m stuck whit the vehicle wrapper, and aside from this problem i kinda like it.

Sincerely,
esoneson

Hi, in the ‘world’ property, try to increase the physic steps and substeps.

Cast a ray down, if the ground gets closer then the distance from the car to the bottom of the wheel, move it back up that distance, (at each wheel corner)

Hi thx 4 your reply, I have alredy done this, and it made it abit better, but it still happens quit often :confused:

The ray works well and if you use the speed of the object to set the Ray check distance it is prety much like continuous collision detection

I guess that this can be done, but It will likely only open up for just an other sets of rays to fail in detecting the ground. (as the wheels already are rays). so it’s not the kind of solution that i’m locking for, but thanks for posting an answer!

The best you could perhaps do is try to increase the number of physics substeps. Otherwise, between the 6DOF bugs and the fact that the vehicle wrapper has seen little in the way of updating or maintenance, you might have to either script a vehicle relations system yourself or use another engine.

It used to be possible to have decent vehicles in the BGE using 6DOF at least, but the fact that none of the current developers know a lot about physics code means it could be years if such bugs ever get fixed.

Well the speed of the vehicle setting the length of the Ray is checking 1 frame ahead of the car in the future you have change the angle of the ray for speed and deviate the next frame

well, thats a shame to the ear.
maby I can update it? or at least give it some maintenance… or at least have a lock at it (lol).

this bugg rly annoys me…

find the wheelpoints of the car,

take the cars velocity, use this to find where the car should be the next frame,

check to see where the car should be, put it there, next frame, then on that frame check where it goes the next frame… and so on, is the only way I can be certain you won’t have issues.

I have heard about using object.suspendDynamics object.restoreDynamics in a single frame after moving it as a hack, but I don’t know if it applies here,

It’s just a guess though but are there any “collision masks” set up in your car? If you do, you might try to stop using them and instead re-enable all collisions and see if it fix it? I faced a similar problem before and the bug from the mask seems to be the cause, hope it helps.

I have found that if you have a “height” value for the suspension that isn’t 0, it tends to bug out more. So try setting your height to 0 (or really low)

thx for the info, but unfortunately i don’t have any collision masks set up inside the cars. anyway thx 4 thr reply!

i did this, and it might have been helping a little, but the bug are still occurring frequently

this method looks similar to the one that are already in use by the vehicle wrapper, and the one i currently having issues whit. I thing implementing this one in python would make the wrapper useless, as there would be 2 modules doing the same thing, at the same time. I would like to move the care using the functions that already exist and not implement new methods as this should not be needed when they already exists. it would also be difficult (and heavy) to calculate the cars position on surfaces that ain’t flat. I’m locking for an method or fix to be able to use the already implemented wrapper, not to implement it on my own in python… but thx for your suggestions ;D

apparently if you move a object that is dynamic or not, doing

own.restoreDynamics()
own.suspendDynamics()
own.restoreDynamics() (if the object is dynamic)

for statics I think its
own.restoreDynamics()
own.suspendDynamics()

updates a objects position in bullet…

I have used it before for some stuff, but I don’t know if it will help you…

I’ve been using the vehicle wrapper and it’s pretty stable. Weird config perhaps?
In earlier days I used to have this problem as well.

Check out the example by BA user Quacky (the damping is way too low, but otherwise it’s pretty good)