Rotating a Vector ( example blend included )

Hello!

I’m playing around with Vectors, and wanted to rotate one while the object is moving to a specified place ( the object should continue to move, but change directions so he can reach the “Empty”, not go straight ahead).

Saw a couple of topics about this particular issue ( tried rotating the Matrix, “rotate” method from the mathutils module ), but couldn’t handle it myself so maybe somebody can help me? Is it even possible with this type of solution?

Attachments

untitled3.blend (551 KB)

vect=own.getVectTo(object)
own.alignAxisToVect(Vect,1,0)

Attachments

GetVectToIssues.blend (464 KB)

Thanks BluePrintRandom for a quick response and a good answer, but I think I will resign from this idea because it’s not correct for my type of game.

PositionVector + OrientationVector * MotionVector.

getVectTo is too intensive for such a basic operation.