This is form your code:
test1a#=object position x(t):test1b#=object position y(t):test1c#=object position z(t)
test2a#=object position x(t):test2b#=object position y(t):test2c#=object position z(t)
Note that the x, y, and z positions that are used are exactly the same for test1 and test2.
I assume that you are trying to measure the angle between the heading of one ship, to another ship. If so, the First xyz position that you want to pass is the location of the base ship. The second position that you want to pass is some point along the current z axis of the base ship. In a sense, what you are doing is defining a line that represents the Z axis (heading direction) of the ship. The third, and final xyz position should be the location of your other ship.
So, now imagine a line drawn from the first point to the second point. Now imagine another line drawn from the first point to the third point. The "find angle between points" feature will measure the angle between those to lines.
Here is some quick Psuedo code to show you how to do it correctly:
`Find Point 1 (Base of Ship 1)
Point1X# = Object Position X(Ship1)
Point1Y# = Object Position Y(Ship1)
Point1Z# = Object Position Z(Ship1)
`Find Point 2 (Point in front of ship1 on it's Z axis)
EZro_SetEuler Object Angle X(Ship1),Object Angle Y(Ship1),Object Angle Z(Ship1)
EZro_SetPos Object Position X(Ship1),Object Position Y(Ship1),Object Position Z(Ship1)
Point2X# = Object Position X(Ship1) + EZro_GetMatZX()
Point2Y# = Object Position Y(Ship1) + EZro_GetMatZY()
Point2Z# = Object Position Z(Ship1) + EZro_GetMatZZ()
`Find Point 3 (Location of second ship)
Point3X# = Object Position X(Ship2)
Point3Y# = Object Position Y(Ship2)
Point3Z# = Object Position Z(Ship2)
Angle# = EZro_AngleBetweenPoints(Point1X#,Point1Y#,Point1Z#,Point2X#,Point2Y#,Point2Z#,Point3X#,Point3Y#,Point3Z#)
Hope that helps
EZrotate!
Tokamak Physics Wrapper!