Question about vehicle physics...

Post Reply
DjSt3rios
Posts: 7
Joined: Mon Feb 13, 2012 2:45 pm

Question about vehicle physics...

Post by DjSt3rios »

Hello, I am a new programmer, and recently I started a project. I am using C4 engine, and I have Bullet physics engine integrated in C4. So I was making an accelerating system, but the problem is when my vehicle reaches like 90 KM/h, it start doing a wheelie(I mean the front wheels do not touch the ground). I tried to set the mass of the chassis to 1500, or more, but still the car starts acting weird if I put a lot of mass, so It doesn't really work as I want it to work... could someone help me with this issue? how I could make it more stable?
kloplop321
Posts: 55
Joined: Sun Jan 01, 2012 7:37 pm

Re: Question about vehicle physics...

Post by kloplop321 »

You could have a base frame which the wheels are attached to and then have another (non-rendered) body which is attached to it using several nonflexible constraints that has a lot of mass, so you're simulating how it would work with an engine inside.
DjSt3rios
Posts: 7
Joined: Mon Feb 13, 2012 2:45 pm

Re: Question about vehicle physics...

Post by DjSt3rios »

kloplop321 wrote:You could have a base frame which the wheels are attached to and then have another (non-rendered) body which is attached to it using several nonflexible constraints that has a lot of mass, so you're simulating how it would work with an engine inside.
so I could sort of, create an invisible chassis, with like 1500 mass, and attach the wheels to it, and put another chassis which would be visible, with like 1000 mass?
kloplop321
Posts: 55
Joined: Sun Jan 01, 2012 7:37 pm

Re: Question about vehicle physics...

Post by kloplop321 »

Well, one body would be visible, with some mass. The other would not be visible, with some mass.
The current problem is that the inertia is being calculated wrong as it assumes that the mass is evenly distributed, which it is not.
That's why you are currently doing a wheelie.
So, if you actually calculated the form of inertia that you want, then you could just use that instead of complicating the simulation.
DjSt3rios
Posts: 7
Joined: Mon Feb 13, 2012 2:45 pm

Re: Question about vehicle physics...

Post by DjSt3rios »

kloplop321 wrote:Well, one body would be visible, with some mass. The other would not be visible, with some mass.
The current problem is that the inertia is being calculated wrong as it assumes that the mass is evenly distributed, which it is not.
That's why you are currently doing a wheelie.
So, if you actually calculated the form of inertia that you want, then you could just use that instead of complicating the simulation.
I don't really think that I can do that.. I am still new at this.. also about the inertia thing you said, I found a function SetMassProps which you can set the mass and the inertia, but I am not sure what I can do with it yet...
Post Reply