For the complete documentation index, see llms.txt. This page is also available as Markdown.

Polar sticks

polar-passthrough.gpc
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_ipolar when output must not feed into the next calculation.

  • Keep angle in 0..359.

  • get_ipolar and get_polar expose the high-resolution radius used with set_polar.

  • Keep set_polar radius in 0..32767.

  • Keep set_polar2 radius in 0..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 with set_val(axis, get_ival(axis)) before calling set_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