Constrain to Vector?

I was wondering if it’s possible to use the constraint actuator or something else with python to constrain an objects movement to any direction besides just the world X, Y, or Z axis. The limits for the constraint actuator only deal with those three, but is there a way to give it a vector, or another object’s local axis?

You can use
http://www.tutorialsforblender3d.com/GameModule/ClassKX_GameObject_18.html
or http://www.tutorialsforblender3d.com/GameModule/ClassKX_GameObject_12.html
to get the vector you want.

Then you can use
http://www.tutorialsforblender3d.com/GameModule/ClassKX_GameObject_1.html
to align to that vector.

check out all the functions here:
http://www.tutorialsforblender3d.com/GameModule/ClassKX_GameObject.html
for more useful functions.