Difference between revisions of "Common Organization of Controls Kit Modes"

m (Modes list)
m (See also)
 
Line 26: Line 26:
 
== See also ==
 
== See also ==
 
*[[cock.getBinded]]
 
*[[cock.getBinded]]
*[[cock.getConvertedInverse]]
+
*[[cock.convertInverse]]
*[[cock.getConvertedDelta]]
+
*[[cock.convertDelta]]
 
*[[Common Organization of Controls Kit Manual]]
 
*[[Common Organization of Controls Kit Manual]]
 
*[[Common Organization of Controls Kit]]
 
*[[Common Organization of Controls Kit]]

Latest revision as of 19:16, 1 September 2013

Inversion and delta mode are used to alter input readings in easy fashion.

Basics

Inversion mode is pretty straightforward, it simply negates input. Delta mode is a little bit trickier. In this mode, instead of reporting absolute value, the control object reports delta value, that is how much input have changed since last update. You can think of it as a velocity at which the reading changes, that is mouse velocity or joystick thumstick velocity. Both delta and inversion modes have "cutoff" mode to prevent it from returning negative values. Delta mode and inversion mode are both having "negative" modes that work together: any negatives negates the output, and double negative makes positive. This may seem to be excessive, but actually it's a lot simplier to do it that way. There's also one special inversion mode for joysticks - "whole" - that converts -1..1 range to 0..1 range, which is particularry useful for HOTAS controllers and XBox360 triggers.

Details

Delta mode is particularry useful when used with joystick; this opens possibility to implement obscure and cunning ways of using analog sticks and XBox360 triggers, that aren't normally can be seen in the games. When used with mouse, this simply returns distance travelled from previous coordinate. Note that if you want FPS-like controls where you would constantly set mouse back to the center of the screen, you should instead use "bypass" mode, since in this state, delta mode would yield acceleration of the mouse rather than distance travelled. You can still use that nevertheless, if you may.

You can also use delta mode to register key presses or key releases, which is useful for "jump" keys etc. Delta with "cutoff" mode could report you if joystick have moved further, but not when it moved the opposite direction, which results in "dragging"-like input.

You set these modes with cock.bind function. If you only want to change one or few them, you'd have to first obtain original values with cock.getBinded, modify them, and bind them back. This is done that way for the sake of simplicity.

Modes list

Inverse

  • "negative whole" / "-=" (-3)
  • "negative cutoff" / "--" (-2)
  • "negative" / "-" (-1)
  • "positive" / "+" (1)
  • "positive cutoff" / "++" (2)
  • "positive whole" / "+=" (3)

Delta

  • "negative cutoff" / "--" (-2)
  • "negative" / "-" (-1)
  • "bypass" / "=" (0)
  • "positive" / "+" (1)
  • "positive cutoff" / "++" (2)

See also