Comments and answers for "Convert Mouse Position - To Transform"
http://answers.unity.com/questions/543856/convert-mouse-position-to-transform.html
The latest comments and answers for the question "Convert Mouse Position - To Transform"Comment by kat0r on kat0r's answer
http://answers.unity.com/comments/544333/view.html
Normals are a VERY basic math/geometry/3d graphics concept, so please google them. For your purpose, what you want is that the object moves in "2D" without Z. A plane is handy, because the camera already uses planes - the near and far plane (https://en.wikipedia.org/wiki/Viewing_frustum). If you move an object on a plane that is parallel to those, the depth doesn't matter, it moves in 2D.
To define a plane in Unity3d, you just use code like "Plane p = new Plane(Vector3 inNormal, Vector3 inPoint);"
inPoint is a point on the plane - your object, the inNormal gives the direction of the plane (google that). Now you can just do p.Raycast, and get the intersection.Fri, 27 Sep 2013 12:58:42 GMTkat0rComment by oliver-jones on oliver-jones's answer
http://answers.unity.com/comments/543865/view.html
I have no idea how to do any of that. Why a plane? Whats a normal?Thu, 26 Sep 2013 15:51:42 GMToliver-jonesAnswer by kat0r
http://answers.unity.com/answers/543861/view.html
You create a new Plane, with origin at the object's position, and a normal pointing to your camera. Then you intersect that plane with your mouse-cursor-ray, and move that object to the intersection.
As you recreate the plane every frame, movement of the camera doesn't matter.
Edit: maybe it would look better if you used the direction of the camera as a normal.Thu, 26 Sep 2013 15:44:00 GMTkat0r