Comments and answers for "Rotating a direction Vector3 by Quaternion"
http://answers.unity.com/questions/859020/force-from-camera-rotation-weird-behavior.html
The latest comments and answers for the question "Rotating a direction Vector3 by Quaternion"Answer by joemane22
http://answers.unity.com/answers/859616/view.html
The solution to this is to use the Unity Matrix4x4 struct. You can easily rotate a vector point after creating the appropriate Matrix by calling Matrix4x4.TRS(Vector3 translation, Vector3 rotation,Vector3 scale). If you pass a zero vector into translation and a one vector into scale and just set the rotation to the desired rotations like this
Matrix4x4 matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(new Vector3(xRotation, yRotation, zRotation)), Vector3.one);
You can easily rotate a direction Vector by calling
matrix.MultiplyPoint(directionVector);
Hope this helps anyone that may run into this same problem!Sun, 21 Dec 2014 12:58:31 GMTjoemane22Comment by joemane22 on joemane22's answer
http://answers.unity.com/comments/859574/view.html
I honestly don't understand this.. I have made 100s of cameras in xna using matrices and never had a problem. I know how cameras work and how to get them to move and the player to.. I think I am just going to do the math the hard way... using Vector math.. seems easierSun, 21 Dec 2014 11:09:25 GMTjoemane22Comment by joemane22 on joemane22's answer
http://answers.unity.com/comments/859567/view.html
Actually just tried Camera.transform.forward for the sake of it and it is the version that goes in circles.. strangeSun, 21 Dec 2014 10:38:36 GMTjoemane22Comment by joemane22 on joemane22's answer
http://answers.unity.com/comments/859566/view.html
this is just a simple version actually I want to isolate the Y rotation since the camera is looking down on the object a bit. This version is here because I have tried every possible way I could think of just to get it to work slightly and build on that.Sun, 21 Dec 2014 10:36:30 GMTjoemane22Answer by tanoshimi
http://answers.unity.com/answers/859565/view.html
Don't you just want camera.transform.forward ?Sun, 21 Dec 2014 10:32:44 GMTtanoshimi