In a world without EzRotate, mathematical savy or any sense whatsoever; how would you position a limb at a location in real world coordinates, regardless of its parent objects angle? I am not yet concerned about the limb's parent limb or the scale of its parent or the objects scale. I will also go on to create a move limb function using the same rules; apply parent object angle to movement.
I have no clue whatsover about these types of things; here is my current Matrix1 concept which probably will not work. I cannot perform any testing of it at present.
No doubt you are aware that Offset Limb calls will not apply real world coordinates; that is it will apply local ones.
This is for the most part a direct copy from the engine; it is not the most important function in the world, so do not kill too much of your time; I am just looking for inspiration.
Global Vec3Calc1 : Vec3Calc1 = New Vector3()
//==================================================
Function LimbPositionToVec3(o, l, vec3 ) ` Might work
Local fDist# : fDist# = Dist#(LPX,LPY,LPZ, X Vector3(vec3), Y Vector3(vec3), Z Vector3(vec3))
Set Vector3 V3Calc1, LPX, LPY, LPZ
Set Vector3 To Angles Between Vectors V3Calc1, V3Calc1, vec3
ax# = X Vector3(V3Calc1)
ay# = Y Vector3(V3Calc1)
az# = Z Vector3(V3Calc1)
Local x# : x# = LPX
Local y# : y# = LPY
Local z# : z# = LPZ
NEW_XYZ
Offset Limb o, l, LOX + x#, LOY + y#, LOZ + z#
EndFunction
//============================================================
Function Dist#( x1#,y1#,z1#,x2#,y2#,z2#)
fDist_X# = X1# - X2#
fDist_Y# = Y1# - Y2#
fDist_Z# = Z1# - Z2#
// Yeah one could use a faster method...
fDistance# = Sqrt(fDist_X# * fDist_X# + fDist_Y# * fDist_Y# + fDist_Z# * fDist_Z#)
EndFunction fDistance#
#CONSTANT NEW_XYZ x# = NewXValue( x#, ay#, fDist# ) : y# = NewYValue( y#, ax#, fDist# ) : z# = NewZValue( z#, ay#, fDist# )
#CONSTANT LPX Limb Position X(o,l)
#CONSTANT LPY Limb Position Y(o,l)
#CONSTANT LPZ Limb Position Z(o,l)
#CONSTANT LOX Limb Offset X(o,l)
#CONSTANT LOY Limb Offset Y(o,l)
#CONSTANT LOZ Limb Offset Z(o,l)
