Version 2.58a
The function linearVelocity does not return global linear velocity referenced to the global frame.
eg
getting the component of velocity of object obj
vx = obj.scene.linearVelocity[0]
vy = obj.scene.linearVelocity[1]
vz = obj.scene.linearVelocity[2]
The components vx. vy and vz are referenced to the object’s frame. If the object is not rotating and the x, y and z axes ([0], [1], and [2]) of the object are aligned to the global axes then the returned values are the same for both the object and global frames.
If the axes of the object are not aligned with the global axes then a calculation is required to convert to the global frame. The object may be rotating and the alignment continually changing.
Is there a function that returns the linearVelocity of an object referenced to the global frame or do I need to do the calculations?
To put it another way.
obj.scene.setLinearVelocity([x, y, z]) sets each component of the objects linearVelocity with respect to the global frame. linearVelocity is not the inverse of setLinearVelocity.
Is there a function that does the inverse of setLinearVelocity?