AnalogListener joystick values

Whether in my own code or TestJoystick, the values that I’m seeing in onAnalog are extremely small and not very useful. They are on the order of 1.1395633E-5. But what I would expect is something closer to a value between 0 and 1 representing a roughly centered position ranging to a fully deflected position. I’m wondering what about the new system am I missing?

I also faced this problem…as far as I remember, you can multiply the value by 10/100/1000 as required and then use it.

Slowdive said:
I'm wondering what about the new system am I missing?

The values are premultiplied by tpf so that they are framerate independent. So you could either lower your framerate ;) or just multiply them as creasy suggested.
normen said:
The values are premultiplied by tpf so that they are framerate independent. So you could either lower your framerate ;) or just multiply them as creasy suggested.


Interesting. Thanks very much for that information!

However, I think in the case of the onAnalog method, the value represented is an absolute position of a controller and really has nothing to do with frame rates. As a matter of fact, since the value is actually frame rate independent to begin with, multiplying it by the frame rate is quite meaningless.

In any event, I can just divide by the tpf and get the original value.

Most anything you do with it would be framerate dependent (like moving spatials etc), I guess thats why its multiplied by tpf.

I guess if you are using the joystick to directly control spatials, perhaps. I personally read the joystick inputs to set a percentage of thrust to the thrusters on the player ship which then apply physics forces. It just doesn’t seem intuitive the way it currently works and if a developer wanted to do something frame rate dependent based on the joystick input then they could easily do that with the provided tpf. It just seems a little backwards currently.



And I guess I still don’t see what the joystick position has to do with frame rates.They are two totally different concepts, like apples and oranges.

Yeah I agree