Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


#ActualL. Spiro

Posted 19 December 2012 - 07:56 AM

Are you seriously unable to add semicolons for yourself?

I said this:
m_vLook.x = sin( θ ) * cos( φ )
m_vLook.z = sin( θ ) * sin( φ )
m_vLook.y = cos( θ )
Which becomes this in code:
m_vLook.x = sin( i ) * cos( a );
m_vLook.z = sin( i ) * sin( a );
m_vLook.y = cos( i );
Where i was “inclination” (the radians up or down your player faces) (notice how I said it was “inclination” and then gave the variable “i” as a substitute) and “a” is azimuth (the radians horizontally your player faces) and you weren’t able to figure out how to convert symbols to letters and add semicolons?
It was code from the first time I posted it.
Pick your variable for θ (I chose i but it could be anything), pick your variable for φ (I chose a but it could be anything), and add semicolons. Seriously?
You already know that θ is the vertical angle and φ is the horizontal angle. Moving the mouse up and down changes θ and moving it sideways changes φ. Cap vertical movement? Cap θ.


I am sorry, but how am I supposed to make this any more obvious?
I gave you the code from the start. You took one glance, saw a single symbol that was not C++, and decided it was a useless post. “Please give me code,” you instantly replied, yet the code was already there.
This is exactly what almost every book is going to give you, so if you can only handle to be spoon-fed I am not sure how far you will be able to go as a programmer.


L. Spiro

#2L. Spiro

Posted 19 December 2012 - 07:24 AM

Are you seriously unable to add semicolons for yourself?

I said this:
m_vLook.x = sin( θ ) * cos( φ )
m_vLook.z = sin( θ ) * sin( φ )
m_vLook.y = cos( θ )
Which becomes this in code:
m_vLook.x = sin( i ) * cos( a );
m_vLook.z = sin( i ) * sin( a );
m_vLook.y = cos( i );
Where i was “inclination” (the radians up or down your player faces) (notice how I said it was “inclination” and then gave the variable “i” as a substitute) and “a” is azimuth (the radians horizontally your player faces) and you weren’t able to figure out how to convert symbols to letters and add semicolons?
It was code from the first time I posted it.
Pick your variable for θ (I chose i but it could be anything), pick your variable for φ (I chose a but it could be anything), and add semicolons. Seriously?
You already know that θ is the vertical angle and φ is the horizontal angle. Moving the mouse up changes θ and moving it sideways changes φ. Cap vertical movement? Cap θ.


I am sorry, but how am I supposed to make this any more obvious?
I gave you the code from the start. You took one glance, saw a single symbol that was not C++, and decided it was a useless post. “Please give me code,” you instantly replied, yet the code was already there.
This is exactly what almost every book is going to give you, so if you can only handle to be spoon-fed I am not sure how far you will be able to go as a programmer.


L. Spiro

#1L. Spiro

Posted 19 December 2012 - 06:59 AM

Are you seriously unable to add semicolons for yourself?

I said this:
m_vLook.x = sin( θ ) * cos( φ )
m_vLook.z = sin( θ ) * sin( φ )
m_vLook.y = cos( θ )
Which becomes this in code:
m_vLook.x = sin( i ) * cos( a );
m_vLook.z = sin( i ) * sin( a );
m_vLook.y = cos( i );
Where i was “inclination” (the radians up or down your player faces) (notice how I said it was “inclination” and then gave the variable “i” as a substitute) and “a” is azimuth (the radians horizontally your player faces) and you weren’t able to figure out how to convert symbols to letters and add semicolons?
It was code from the first time I posted it.
Pick your variable for θ (I chose i but it could be anything), pick your variable for φ (I chose a but it could be anything), and add semicolons. Seriously?
You already know that θ is the vertical angle and φ is the horizontal angle. Moving the mouse up changes θ and moving it sideways changes φ. Cap vertical movement? Cap θ.


I am sorry, but how am I supposed to make this any more obvious?
I gave you the code from the start. You took one glance, saw a single symbol that was not C++, and decided it was a useless post. “Please give me code,” you instantly replied, yet the code was already there.
This is exactly what almost every book is going to give you, so if you couldn’t take 2 seconds to understand that it was already code you will never learn any math as a programmer, and as such you will never really truly be a programmer.


L. Spiro

PARTNERS