sc-controller icon indicating copy to clipboard operation
sc-controller copied to clipboard

Joystick camera - Map Range to Edge

Open MyFilippo94 opened this issue 2 years ago • 0 comments

Would be nice to have an option to have the Joystick Camera function rescale its vector compared to the edge of the pad, rather than its usual half-pad radius.

I might on purpose put my finger on the bottom of the pad to allow myself much more room to make a precise upward movement. In such a case I'd expect my upward range to be, say, -0.75 - 1.0, to add 75% more granularity in my input. At the moment, it's a simple translation, so my range ends up being -0.75 - 0.25, with 0.25 - 1.0 range of deadzone.

Having a constant range is important when you want a consistent output, such as for example, when indeed using a camera: having its sensitivity vary as you move it might be disorientating, as it'd result in non constant motion speed. However there are some cases where I might want to have a variable range, such as when you use it for movement: When you put a finger on the pad it's not really certain where you did put it, but while moving it the edges become very obvious, and you would expect there to be the max input.

Currently, if I put my finger on a non-zero position (0.5 for example), there's a region where I can not reach max input (1.5 is out of range) and a region where no input can be given (-0.5 - -1.0 is useless). Therefore, if I wanted an analog stick emulation that always starts at 0,0 coords every time I have to put my finger on the pad, I have to compromise with the fact that I will not reach max input in some directions, or with a smaller range, and an even wider dead zone.

In other words, with this option enabled, if I put my finger in coords

X = 0.25
Y = 0.5

The expected mapping should be:

input X -1    >> output X -1
input X 0     >> output X -0.2
input X 0.25  >> output X 0
input X 0.625 >> output X 0.5
input X 1     >> output X 1

input Y -1    >> output Y -1
input Y 0     >> output Y -0.33
input Y 0.5   >> output Y 0
input Y 0.75  >> output Y 0.5
input Y 1     >> output Y 1

Might also be useful to have non-linear mappings, such as a radial one, so that the middle-top of the pad is always 0,1, even if offset is 0.25,0.0, therefore only moving "the center of the circle" while having every ray from it always reach the same point on the circumference, rather than being offset itself as well, but that might become harder.

Some visual examples:

  • Current implementation:

current

  • Proposed implementation:

proposal

  • Radial implementation:

radial

MyFilippo94 avatar Jan 30 '22 11:01 MyFilippo94