Rob,

THANK YOU! Got it working as desired with your recommendations with
the current trunk... Thank you, Thank you, Thank you!

http://www.directresponsemedicine.com/flexsandbox/trek/

I can now rotate the scene in any direction and click on any object
(other than the center ship) and hit those objects with phasors in the
very spot I clicked. If I click on the nacel or bridge I get hits in
those specific areas. Again... Thank you!

I did the following to create a globalToLocal transformation:

var v:Vertex = new Vertex(event.sceneX,event.sceneY, event.sceneZ);
var m:Matrix3D = new Matrix3D();
var m2:Matrix3D = new Matrix3D();
var m3:Matrix3D = new Matrix3D();
m.clone(this._innerContainer.transform);
m2.clone(this._outerContainer.transform);
m3.multiply(m2,m);
m.inverse(m3);
v.transform(m);

Tony

Reply via email to