- Home /
Mouse Axis in 3D Space based on RaycastHit normal?
Hello, I have been using Unity for around 3 years, I am new to Unity Answers, and I have one nagging problem that I can't seem to find an answer to online.
I am making a 3D level editor and am trying to "extrude" (scale) the dimensions of a cube. I am trying to do this by dragging the mouse from a mesh face.
I have already tried using RaycastHit.normal to find the distance between the original mouse position and current mouse posititon (using Camera.ScreenToWorldPoint()). I have also tried using Vector3.Dot() and Vector3.Cross() products. Using Input.GetAxis() somewhat works, but when doing this from different angles (which is imperative) the axis is oriented differently and this can cause unexpected results and logic errors as a result.
Any help would be greatly appreciated. In case you didn't understand what I mean, here is diagram showing what I am trying to do.
![alt text][1]
Your answer
Follow this Question
Related Questions
Steering Wheel / joystick GetAxis trouble 0 Answers
2D collision detection in 3d games 0 Answers
Reset Input.GetAxis Back to 0 0 Answers
LookAt() with X axis 1 Answer
,Look rotation viewing vector is zero and character always facing 1 direction when idle 0 Answers