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!

We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Posted 03 January 2013 - 02:18 PM

thanks for the reply,


ok im nearly there.....


Posted 03 January 2013 - 02:13 PM

thanks for the reply,


rofl so the dot product is basically, the calculated length of v1 and v2 added.


since its the same calculation to find the length. So by dot product they mean the sum of the total length, couldn't they have just said that instead of dot product, damn see how confusing...


this gives the cosin of the angle but not the actual angle, then I keep going eventually I get the angle in radians....ill be back


Posted 03 January 2013 - 02:00 PM

so one vector is my ship to the target, the second vector is the target to my ship.


in our example one normalized vector is 0.7 which is the vector of the enemy from me. So I find this dotproduct of .7 AND what ever the other normalized vector is for the target to my ship. And the result is the cosign of the angle of those two vectors. ?


Think I am getting confused with what the cosign is, in order to find the cosign do I need to cos(variable here) which is what i've been thinking all along? Or I actually have the cosign all along once I find the dot product of the two vectors. And if have cosign, what then does feeding the cosign to the cos function do?