MerlinofMines / EasyCommands

Github Repository for Ingame Scripts built by MerlinofMines. Uses MDK to Deploy to SpaceEngineerse
GNU General Public License v3.0
8 stars 3 forks source link

`RotationIndicator`, `RollIndicator`, `MoveIndicator` are mouse/controller sensitivity dependant #161

Closed jgersti closed 2 years ago

jgersti commented 2 years ago

see the notes at https://github.com/malware-dev/MDK-SE/wiki/Sandbox.ModAPI.Ingame.IMyShipController

For the normal PC user (mouse+keyboard) this only affects RotationIndicator

MerlinofMines commented 2 years ago

This behavior is intended, as it means that your sensitivity settings will change the speed at which things are moving, especially when using the mouse. I tried to set the scaling values so that the default sensitivity settings equate to values of "1" at maximum rotation / movement using default sensitivity.

What is the specific concern and/or proposal for a fix?

jgersti commented 2 years ago

My solution would be to use the sign on everything so it has a reproducible and welldefined value.

MerlinofMines commented 2 years ago

You'd sacrifice fluid feeling rotation control via mouse if only using the sign. I'm not sure I wanna give that up. IMO if you change your sensitivity settings and want to directly use hen you'll have to scale. You can also check the sign in the script. We could add a quantized operation to map values to -1,0,1 for a given vector or number, perhaps?

jgersti commented 2 years ago

My initial problem was that i noticed that the rotation values changed accidently hit the dpi buttons on my mouse. This means the maximum absolute value changes dependending on hardware specs and OS settings.

I would be ok if we just add a standalone the sign function for numbers (Math.Sign) and vectors (Vector3D.Sign).

MerlinofMines commented 2 years ago

Cool. Let's add the operation and get the best of both. We should also update the docs around inputs to clarify that they are sensitivity dependent and that you can quantize using the new operation. I like quantize and sign as keywords.

jgersti commented 2 years ago

Opened a new Issue for the input documentation #164.