I am building a game that launches a ball at a target(Plane). The Plane is rotated back 45 degrees. I want to convert the global ball position(x,y,z) into the local coords of the target so I can detect where it hits.
Any ideas?
Use the target plane's inverseSceneTransform
to transform the position
vector of the ball. That should do it.
var localPosition : Vector3D;
localPosition = plane.inverseSceneTransform.transformVector( ball.position );
That should give you the ball's position in the plane's local space.