# problems with object going through things, jumping around, collision bounds

Ok so I’m trying to do a simple test of the game engine with driving a vehicle. The problem I’m having is when I drive it, it goes through things, even with collision bounds turned on on everything. I’ve tried different settings and nothing works, and a lot of times my truck just flies all over the place and spins around and does odd and stupid things it’s not supposed to! any help would be greatly appreciated! thanks!

### Attachments

bridge and truck.blend (522 KB)

You wheels are inside your car

it is colliding with itself,

here is a re-rig,

you can’t use set Pos

you need apply force,
or change accel,

### Attachments

bridge and truck.blend (490 KB)

Thanks! the collision is working better now… but I’m not sure what you did with my steering, it doesn’t steer properly now… and my wheels are turning funny which I don’t even know how you got them to turn in the first place lol

Ok, the wheels are now not parented, they are linked with 6dof linkages,

the steering is going to need to be done by adjusting the angle of the front wheels,

you will need 2 “A arms” that are actually just a pivot point that is static that your wheel hooks to, and they change angle

I noticed they weren’t parented anymore when I tried moving the truck over… honestly, I don’t know what “6dof linkages” mean and the A arms. I’m not that advanced yet lol. Are there any good tutorials out there that you know of that are specific to what you’re talking about? I also noticed that the wheels are also spinning as I move and change speed with my speed, something I’ve been trying to figure out for a long time

hmm I found where you added “6dof” under a constraint… but I’m still very confused

Well, a A arm is a car part, in the suspension, and a ball joint and much more,

but a 6dof is a 6 degree of freedom joint

it’s like parenting, but not “Locking” it’s relation, you define limits instead

they are VERY handy for simulating mechanical systems

you were using “set Pos”

which means you could clip right through anything,

now making the car “dynamic” means you can apply forces with the motion actuator not just SetRot and SetPos

the wheels as “rigid bodies” can be defined to apply torque to move, instead of just applying forces on the car, as a real car does not usually have a rocket engine,

so if you define your suspension(6dof links) and “engine”(applying torque etc) correctly you can build just about any system

the tricky part comes in steering without using torque(not realistic) but using setAngle and python
to change the steering angles,
but it is not that tricky

I did notice that 2 wheels were rigid and 2 were dynamic, and the truck was dynamic… I tried changing them all to the same, both ways, but that didn’t fix the steering issues. I like rigid because it tilts and stuff where as dynamic it stays level even when it falls or goes over hills… but for some reason with what your did it tilted even in dynamic… but for me it’s always only tilted on rigid body. I have tried recreated what you did in a separate file but it just jumps around yet! the wheels pop off and everything just dances around and jumps all over… and nothing was touching either! Nothing ever works :no:

lol

it’s ok sometimes things are a little tricky,

Here, check this out

### Attachments

TankGameDemo.blend (674 KB)

not exactly what I’m supposed to be looking for in the tank game settings… but when I turn, it continues to turn and if I go the other way it just keeps going the other way. I’m trying to make vehicles drivable in a way such as in GTA. I do appreciate all you have done, so thanks for that. But on the truck that you rerigged, how come when I drive forward it jerks around and doesn’t drive straight, and also when I try turning it don’t turn like it’s supposed to and sometimes it turns the opposite way, or not at all. How would I fix that? unless it’s something on my end… I have 2.66 and just installed it a couple days ago.

ok it don’t matter what I do it screws up! I started from scratch and again, when I set it for dynamic it just stays level and doesn’t move with the ground, and dynamic my truck just tumbles, spins around, flies up, and goes bazerk… whatever i do it just don’t work right!

There are other things to look out for, like where the origin of your truck is. If your game bbots up and the origin of a dynamic entity is inside or in contact with another entity with physics you will have a problem. If you parent objects they might have conflicting physics or origins.

My steering is not working right… how do I set it so it steers and goes where I want it to? Also it’s going through the ground really bad rather than staying on top, it’s not falling through all the way, but it sinks in. Anyone know how to fix these issues? thanks for any help!

### Attachments

Ok fixed it,

there were a few things off,

I made it so the wheels apply torque, so you will not “fly” (move in direction you are facing in air)

try this

### Attachments

it’s still not working right… if it works right for you, then I have no idea what’s happening on my end

Nevermind! I was in the wrong one! It does steer better, but when I turn, after I release the button, it just keeps on turning and don’t drive straight, if I turn the other way, it continues to keep turning rather than going straight again, it’s impossible to drive straight once I start turning, do you know how to fix that?

what is not working? did you get my .blend open?

make sure your looking @ the right file (I should have renamed it in retrospect)

did u see the 2nd post I made after you reposted it?

Fixed

I deleted the camera stuff,