Recording Local Velocities of an object

Hi all! I’ve been attempting to find out how to record the local x,y, and z velocities of an object using python, but unfortunately my searching has been fruitless. If you know, could you post the code please?

(Chances are it’s probably simple. Excuse my noobness :o).

What do you mean by “record”? Do you mean record in the animation sense or record in the sense of saving data between script executions?

I know I’m interest in getting the bounding box (top, bottom, left, right, front back) of a selected object.

‘Record’ in the sense of having variables that are equal to the local velocities of an object. For example:
x_velocity = [local x velocity of the object]
y_velocity = [local y velocity of the object]
z_velocity = [local z velocity of the object]

I’m getting closer. I modified a piece of code from a game resource, but it only records global velocities for the object. This doesn’t quite solve my problem.

import math
own = GameLogic.getCurrentController().owner
mult = 3
v = own.getVelocity()
x_velocity = v[0]
y_velocity = v[1]
z_velocity = v[2]

If anyone knows how to modify this code to record local velocity, it would be endlessly useful.
Cheers!

getLinearVelocity(local=0)?
http://www.blender.org/documentation/249PythonDoc/GE/GameTypes.KX_GameObject-class.html#getLinearVelocity

VLL = own.getLinearVelocity(0) # Velocity, Linear, Local list

VLLx = VLL[0]
VLLy = VLL[1]
VLLz = VLL[2]