getAngularVelocity while vehicle is still

The below code snippet is in my simpleUpdate so I can see constant Angular Velocities. At first, the car is not moving and all numbers are 0 as it should be. However, when i drive the car around then stop, the numbers don’t necessarily go to 0. For instance, I drive the car so it is facing about 90 degrees from the direction it started and hold the brakes. The car is shaking slightly, but not ±25 degrees about the car’s x direction. Also, I’m driving on a completely flat floor, so i shouldn’t really be getting anything on X or Z at all I would think.



[java]

Vector3f annVels = new Vector3f(0, 0, 0) ;

player.getAngularVelocity(annVels);

System.out.println(“Angular Velocities” + annVels.mult(FastMath.RAD_TO_DEG))[/java]



Here are some of the readings:

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(-25.56078, -1.2272995E-6, 8.4304085)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(25.560745, -8.0041275E-7, -8.430383)

Angular Velocities(-25.560747, -1.0138561E-6, 8.430399)

Angular Velocities(-25.560747, -1.0138561E-6, 8.430399)

Its not absolute degrees, its the velocity. When you hold down the brakes the car shakes very fast, so the numbers are ok.

If it is in World Units per second, how might this be converted to degrees? I am assuming that it is measuring the tangential velocities in 3D about a circle of some unknown radius.

Its radians per second I guess… Just not absolute “i rotated this amount” values.

I came up with what I thought was a way of getting actual angular velocity, as long as getForwardVector is actually returning what i think it is, which is a normal vector of the direction the front of the vehicle is facing. Thought I’m not sure how it knows what side is Forward.



Basically, I get the call getForwardVector() then getTime(). I then wait for a certain time and call getForwardVector() again. Knowing which way the vehicle is facing at two different times, I should be able to find the angle between the two forward Directions. So I convert each forwardVector XYZ coordinates to project them onto each of the 3 planes as Vector2fs (XY, YZ, and XZ). Then I use angleBetween() on each pair. This gives the angle between the vectors in each plane. Then dividing this by the time between measurements should give angular velocity.



Does the above sound correct?