Raised This Month: $ Target: $400
 0% 

Set origin within a range


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 07-20-2011 , 17:22   Re: Set origin within a range
Reply With Quote #1

Well not just cause of stuck, will do that for sure. Just I want to manipulate the origin abit.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-20-2011 , 18:59   Re: Set origin within a range
Reply With Quote #2

Code:
new random_origin[3] random_origin[0] = random(100) random_origin[1] = origin[1] + random(sqroot(10000 - (random_origin[0] * random_origin[0]))) random_origin[0] += (random(2) ? origin[0] : -origin[0]) random_origin[2] = origin[2]

That will generate a random origin within a 100 radius, only taking into account a horizontal radius.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 07-21-2011 at 09:07.
Exolent[jNr] is offline
Reply



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 00:56.


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