Polar sticks
int raw_angle;
int raw_radius;
main {
raw_angle = get_ipolar(POLAR_RS, POLAR_ANGLE);
raw_radius = get_ipolar(POLAR_RS, POLAR_RADIUS);
set_polar(POLAR_RS, raw_angle, raw_radius);
}For a virtual/ghost stick:
main {
set_polar2(POLAR_GHOST, 180, 3000);
}Rules:
Use
get_ipolarwhen output must not feed into the next calculation.Keep angle in
0..359.get_ipolarandget_polarexpose the high-resolution radius used withset_polar.Keep
set_polarradius in0..32767.Keep
set_polar2radius in0..15000.Avoid mixing polar and direct X/Y final writers unless the conversion/precedence is intentional.
After
block_all_inputs(), restore both axes of the target physical stick withset_val(axis, get_ival(axis))before callingset_polar(). Otherwise, nonzero physical input can override the corresponding polar axis. See Interaction with polar output.Make the final polar write the last writer for that stick/ghost output.
Last updated

