# How to init vehicle with some speed & acceleration?

Hi, i’m using physX vehicle for my simulation, and i want to init my vehicle with speed & acceleration other than start from 0. Is there any way about this?

The speed is relatively straightforward but I don’t foresee any simple mechanism that will set a start acceleration

The wheels need to be given a rotational speed that matches the rigid body speed at the centre of the wheel.

The engine needs to be given a rotational speed that matches the wheel speeds after accounting for the gear ratio.

The rigid body needs to be given the start speed.

The calculation becomes simpler if the car starts with purely forward motion on a flat plane. In this case, if your gear ratio is G, the final gear ratio is F, the wheel radius is R and the start speed is S then

wheelRotationSpeed = S/R

engineRotationSpeed = GFS/R

Thanks for your reply. It’s right to calculate wheel rotate speed by your way. But I had tried another way to set linear velocity and angular velocity to rigid actor, and then the wheel rotated automatically for the tire friction. The acceleration will be calculated after more than two frames.