# RunsWithScissors

Member

5

100 Neutral

• Rank
Newbie
1. ## Beginning programmer needing some advice

If you are looking for a way to step into the industry as a programmer, I'd suggest finding an engine that uses C++. Nearly every programmer job asks for extensive C/C++ knowledge. Without it, you will most likely be stuck in the indie market (which is fine if that's what you like). That being said, I think Unreal is a great choice as well if you want a powerful, potentially beautiful engine without diving headfirst into a .cpp file. UnrealScript is fun and fairly simple to use.
2. ## Eular angle question

I could be wrong but it seems like what you are looking for is a quaternion. You can't represent any rotated vector by only rotating it around the Z-Axis. A quaternion is simply a vector in space that can represent your rotation and then an amount of rotation around that axis. But constraining the rotation to only rotating around the Z-Axis will limit your degrees of freedom. Hopefully this is what you were trying to explain. If not, correct me and hopefully I can help.
3. ## Getting the Forward Vector from a Camera's Current Rotation

So I appreciate the help, but I was able to figure it out on my own. So for anyone who encounters this problem with quaternions in XNA, the solution follows: Quaternion temporaryQuaternion = camera.RotationQuaternion; temporaryQuaternion.Conjugate(); Vector3 forwardVector = Vector3.Transform(Vector3.Forward, temporaryQuaternion); If anyone can explain the math behind why you use the invese of the rotation quaternion to apply the transform to the world forward, I'd love to hear it.
4. ## Getting the Forward Vector from a Camera's Current Rotation

The problem with XNA is that there is no operator overload for multiplying a Vector3 and a quaternion. This is my current line of code to try to calculate the forward vector: Vector3 forwardVector = Vector3.Transform(Vector3.Forward, camera.RotationQuaternion); It only works in about half of the octants of the 3D space though.
5. ## Getting the Forward Vector from a Camera's Current Rotation

So I am working in C# using XNA and am trying to create a 6DOF camera for an airplane game using quaternions. I have a FPS quaternion camera made and working fine. The rotation of the aircraft camera is perfectly fine, but when I compute the forward vector of the aircraft to figure out the vector in which to apply forward movement, it doesn't always go in the correct direction. So in short, how can I find the current forward vector of a camera using the rotation quaternion in XNA? I know there are tons of quaternion questions on here, but I haven't found any C# ones that have worked for me.