so, I know I can have an object tell me a vector from itself to another object or point. in blenderpython 2.7ese this is KXGameObject.getVectTo([point] or KXGameObject)
but now I’m stumped on how to generate the same sorta thing when I have no game object at a point and want to get a vector from that point to another point.
I looked up the math to do it, people said you subtract the starting point from the point you want to get to.
but this does not work in a real game environment because we have negative 3D space. So if I wanted to calculate the vector from [0,1,2] to [1,-1,1] subtracting 0,1,2 would give me a vector of [1 - 0 =0, -1 -1 = -2, 1-2 = -1] [0, -2, -1]
This would be incorrect. having an object point an axis at this vector would be the wrong angle.
How can I code around this?
if you use python 3.0 + thats fine. Either will give me the basic info I need and I can translate it back.
The principles of linear algebra work the same in Blender as they do in Unity or Unreal or Frostbite or pencil and paper. this is fundamental mathematics… Your statement is akin to saying “2+2 does not equal 4 in this engine because we use DirectX”.
I suppose the reason I did not think it worked is because when I put an object at these same points and had it give me the vector between itself and the point listed, blender gave me an entirely different list of numbers:
to me, blender’s vector makes 0 sense whatsoever unless it’s proportionately scaling the number down to it’s lowest possible value… but the fact it was different made me think I was doing something wrong.
yeah I meant as in blender/python where “,” separates numbers in a list so [10 then 8 then 4] so I assume it would then get the length by calculating the hypotenuse from the origin to this point, then divide each part by the hypotenuse.
ok. if that’s the case, it’s extra math steps, probably not needed in the big picture of things.