Advertisement

02.22.2008 at 08:57AM PST, ID: 23185046
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

2D Math question - relative position by rotating the axis

Tags: Microsoft, Visual C++ .NET, 2005
I have a problem. I'm actually writing some code that will do 3D sound using the FMOD library and OpenGL, but that's not important. What I need is some help with a math concept:

I have two characters in a 3D world. They have an X/Y/Z coord, and a rotation. The world is defined as follows:
         X is in the direction to the "right"
         Y is in the direction "up"
         Z is in the direction "forwards"
   Yaw is rotation about the Y axis. So rotation is in the XZ plane. 0 rotation means the player travels in the positive Z direction. A positive value is a rotation counterclockwize in the XZ plane. See my diagram.

Because the characters only ever have a yaw rotation, we can effectively show my 3D world as an overhead view of the X/Z plane. I don't want to overcomplicate things.

Now, I need to calculate the enemy's position relative to the player. Taking into account the player's current rotation. FMOD uses a different coordinate system (but this is really just naming conventions). FMOD's coordinate system is like this:
       +X as right
       +Y as up
       +Z as forwards.

So... I need to do some kind of axis rotation here. I'm not sure how to go about doing it. Can anyone help?

I'm fairly advanced in Math. I know trig/matrices/vectors/linear algebra/calculus all fairly decently. Matrices are probably my weakest. So hit me with whatever you got ;)

Please look at my diagram it makes my question so much easier to understand.
Attachments:
null
Diagram describing the problem
Diagram describing the problem
 
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: Frosty555
Solution Provided By: NovaDenizen
Participating Experts: 1
Solution Grade: A
Views: 23
Translate:
Loading Advertisement...
02.22.2008 at 09:46AM PST, ID: 20959617

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2008 at 04:41PM PST, ID: 20962993

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2008 at 04:44PM PST, ID: 20963005

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.25.2008 at 08:48AM PST, ID: 20977037

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.25.2008 at 08:52AM PST, ID: 20977073

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.25.2008 at 05:35PM PST, ID: 20981014

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 10:50AM PST, ID: 20987366

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2008 at 12:38PM PST, ID: 20988516

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628