Raised This Month: $ Target: $400
 0% 

Calculating circular origin?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
AdrenalinesWrath
Junior Member
Join Date: Aug 2017
Old 05-16-2022 , 18:56   Calculating circular origin?
Reply With Quote #1

hello everyone,

I'm trying to get origins around an origin to create a beam between center and the end of the circle
and I'm not really good at math lol.
for example origin would be {0.0,0.0,0.0} which would be the center, and the distance would be 150.0

so I want to make it start from the top of it, and make it go in circular motion by 360°

any snippet for it?

probably by using floatsin() and floatcos()? I have no idea how to use them

thanks in advance!


Figured it out! here's a lil snippet if anyone needs it:
PHP Code:
stock get_circular_origin(Float:angleFloat:origin[3], Float:radius,Float:COrigin[3])
{
       
COrigin[0] = radius floatcos(angle,degrees);
       
COrigin[1] = origin[1]
       
COrigin[2] = radius floatsin(angle,degrees);

__________________
"True Strength's keeping everything together, while everyone expects you to fall apart."

Last edited by AdrenalinesWrath; 05-16-2022 at 19:21.
AdrenalinesWrath is offline
 



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 21:23.


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