Can't set Ammo Physics Bus settings

Hey, I am trying to make bus controls through the latest big buggy example but having an issue in moving the bus. When the bus stops, a random amount of reverse force is applied on bus by which bus tilts upside down.
It will be great if somebody helps me in finding the issue.

Here is a public link to my project: https://playcanvas.com/editor/scene/1002337

Is the braking force too high?

No its same as of engine force. Its 10 and if i lower that then same issue happens on moving reverse i.e. bus jumps from the front.

@saif, just tried the project, this is odd. Now if I try even going forward, then the bus jumps back after a very little distance. Could you post the relevant bit of driving code here? That would really help as this is still a decently large project. I’ve done several projects with the vehicle physics demo, but never faced this :thinking:. Hopefully with the code I can help you out with this.

hey @DevilZ, The code is the same as of big buggy i.e. The link I provided above. The only problem I am having is in adjusting the settings of the vehicle physics.

So the problem arises when you change the attributes?

The problem is i am not able to set the required settings so that move smoothly.

Just so that I’m absolutely sure, it’s these settings?

Yes these are the settings.

1 Like

Just forked it, reducing the engine and braking forces seems to reduce the pitching forward and backward. I’m trying something in my fork, will revert soon.

1 Like

@saif the problem is occurring due to your placement of the compound rigidbody collision shapes. If you select them, you’ll see that they are not really concurrent to the bus’s position. Change those, and reduce the forces and you’ll be fine.

EDIT - The wheels aren’t exactly placed too.

2 Likes

Thanks @DevilZ, i have adjusted the rigid body and it has improved alot. :slight_smile:

1 Like

Glad to hear it’s worked @saif! My guess was that the pitching was due to a high center of mass. While buses will pitch a little under braking, lowering a bit will always help :grinning:.

1 Like