Is this possible? Lost on math

GPC2 script programming for Titan Two. Code examples, questions, requests.

Is this possible? Lost on math

Postby Twitchsfl » Tue Jun 15, 2021 4:10 am

I’m attempting to create a stick pattern with the right analog stick but the polar coordinates are defeating me.
This is what I’m after but it appears theta is not a valid mathematical function.
Image
Is it possible and any help would be appreciated
User avatar
Twitchsfl
Private
Private
 
Posts: 1
Joined: Tue Jun 15, 2021 4:04 am

Re: Is this possible? Lost on math

Postby Mad » Tue Jun 15, 2021 8:03 pm

Sorted on Discord. :smile0517:
Code: Select all
main {  
  fix32 theta = (fix32)system_time()/100f;
 
  set_val(STICK_1_X, cos(theta) * 5f);
  set_val(STICK_1_Y, sin(theta) * 5f);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: Is this possible? Lost on math

Postby antithesis » Wed Jun 16, 2021 11:20 am

Straight over my head, but it's great to see some of the more complex (or simple...I can't tell) math being used on T2 :)

What's the purpose of this pattern? Looks like aim assist abuse.
Official Australian retailer for Titan One, Titan Two and XIM APEX at Mod Squad
User avatar
antithesis
Colonel
Colonel
 
Posts: 1912
Joined: Sat May 28, 2016 10:45 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 89 guests