[SOLVED] Walaber Vehicle Class

gzmzhen

08-08-2006 00:06:45

I'm using the vehicle class from Walaber's StuntPlayground, but for some reason (and the same thing happens with the vehicle class in the OgreNewt demos) if I change the y-pos in the pos parameter of the

mVehicle->getChassisBody()->setPositionOrientation(pos,orient)

function to something around 200 then the vehicle is seperated from its wheels and no longer works with OgreNewt.

How do you position a car in the space initially? Is there a different function that allows you to put it anywhere? I'm guessing I overlooked it somewhere and got stuck that this function says "set position orientation" and the fact that all of the other positions were offsets from the body (i.e. the chassis).

Thanks.

walaber

08-08-2006 06:41:10

most likely you are placing the vehicle outside the limits of the OgreNewt::World. make sure you don't try to create a vehicle outside the limits of the world.

you can set the size of the world yourself to any size you want.

HexiDave

08-08-2006 07:03:53

Also make sure that, if you're placing it on the ground, you don't place it IN the ground - the wheels might spaz out and fly off into oblivion. I had something similar happen when I wasn't thinking clearly and tried to create a collision box around the world to keep the cars from flying off the edge and... well, I kinda put the world in a box so all the cars spazzed out. I had a cheap-o MoveCar() function for adjusting position, I wonder if there's any differences.

gzmzhen

08-08-2006 18:49:06

Thank you both, it was a world-size problem.

fizzle

13-08-2006 17:21:51

try making your own car and then driving towards a cliff, see if your tires droop down, i am trying to figure out proper values for setting suspension, shock and length