Get Linear Velocity in one axis, not all

:evilgrin:

velLocX=obj.localLinearVelocity[0]

velGloY=obj.worldLinearVelocity[1]

[0]=x
[1]=y
[2]=z

PS:linearVelocity() return the LOCAL velocity, not global(is a mistake)

thanks just one little question, which the difference between the sensor state “activate” and “just activate”

just activate is only the “first tick” (first frame) (when you press a key)

if you keep the key pressed this become “active” in the second frame and over (not sure if “active” is the right name)

[email protected]
i was thinking it was for that but i can’t find info
@MarcoIT

http://www.blender.org/documentation/blender_python_api_2_60_0/contents.html

http://www.blender.org/documentation/blender_python_api_2_60_0/bge.events.html

see this, is not much complete , but can be very usefull :wink:

For your information, the complete syntax is:

KX_GameObject.getLinearVelocity(local=False)
there is a parameter that tells the function what space to use (local or world). :wink: