linearVelocity vs. velocity

What is the difference between getLinearVelocity() and getVelocity(). And does anyone know the best way to access the current velocity of a given local axis?

They are vectors that add up to a single direction and magnitude, but from what I can tell the two functions do exactly the same thing. As if to say “you want linear velocity? take this and figure it out. You want just velocity? take this same thing, and figure it out.” Am I right about this?

I think linear velocity is either velocity in one certain direction or it 's velocity acording to the rotation of the object opposed to velocity of the object acording to the world. hmm, that didn’t really make sense. :expressionless:

Pooba

I have found that both functions return the same value, unless the object is rotating. I’m not sure exactly why though, you’ld have to experiment with it yourself.

I’ve been expirimenting with an arrow object that rotates with drot for orientation purposes, and I get no difference. Maybe I should try torque rotation, and then I’ll find the discrepency your talking about. Or maybe all I have to do is simultaneously rotate and move forward.

Well, velocity itself is speed in a specific direction, so what would linear velocity be?

I guess pooba must be right then. but it’s not very obvious which is which.

Another question on a similar note: has anyone been able to use the setVelocity function (in the motion actuator) to stop an object moving? I find that the python function only works for ‘add’ velocity not ‘set’ velocity (so when you give it zero values it aint do nuffin :-? ).

You can get the object’s velocity, and set the velocity in the motion actuator to the negative of the object’s velocity. Even better though would be to use applyImpulse.

Searching the forums would have turned up this post:
https://blenderartists.org/forum/viewtopic.php?t=15805&highlight=applyimpulse