Raised This Month: $ Target: $400
 0% 

[Help] Point To Sky Origin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 11-21-2010 , 12:00   Re: [Help] Point To Sky Origin
Reply With Quote #6

Just expand the vector from origin 1 and then perform a traceline to get the actual origin present in the sky for eg:
Code:
// lets take an example value for origin 1 new Float:origin1[3] = { 1.0, 2.0, 4.0 } // Now we will make a vector which will be pointing towards the sky new Float:vToSky[3] = { 0.0, 0.0, 1.0 } // This is basically a normalized vector which is pointing towards the sky (i.e towards the z-axis) // Now we will extend the vector vToSky[2] *= 99999.0 // Should be enough ?? // Now we will add the vector to origin1 so that we can get an origin presnt in the sky (which will be 99999 units above origin1) new Float:origin2[3] origin2[0] = origin1[0] + vToSky[0] origin2[1] = origin1[1] + vToSky[1] origin2[2] = origin1[2] + vToSky[2] // so origin2 will be { 1.0, 2.0, 100003.0 } // For more safety you can perform a traceline between origin1 and origin2  to get the exact point where the map ends (i.e the point where the sky is present)
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode