Hi
I have 2 entities and all I want to do is convert the first entity's world coords into the second entity's local coords.
I can do this using TFormPoint except when I ScaleEntity one of the entities, TFormedX, TFormedY and TFormedZ seem to be affected by the entities scale.
I can't believe TFormPoint is supposed to work in this way! Any ideas?
Cheers.
I have 2 entities and all I want to do is convert the first entity's world coords into the second entity's local coords.
I can do this using TFormPoint except when I ScaleEntity one of the entities, TFormedX, TFormedY and TFormedZ seem to be affected by the entities scale.
Graphics3D 800,600,32 SetBuffer BackBuffer() cam = CreateCamera() PositionEntity cam,0,0,-15 light = CreateLight() ball = CreateSphere() PositionEntity ball,5,6,7 cube = CreateCube() ;ScaleEntity cube,1,2,3 ;Un-comment this to get strange results! While Not KeyHit(1) TFormPoint EntityX(ball,1),EntityY(ball,1),EntityZ(ball,1),0,cube RenderWorld Text 10,10,TFormedX() Text 10,25,TFormedY() Text 10,40,TFormedZ() Flip Wend End
I can't believe TFormPoint is supposed to work in this way! Any ideas?
Cheers.