[Opensim-dev] joystick 3D cursor not returning to rest
CJ Davies
cjohndavies at gmail.com
Mon Mar 26 14:37:29 UTC 2012
(Apologies if you have read this already on Opensim-users but it didn't
get any repsonses there so I thought I would try here as well.)
I have an accelerometer connected to an Arduino that has been reflashed
to imitate a standard USB HID joystick which I can use with a Second
Life/OpenSim viewer using the standard joystick support - it's kinda fun
actually!
I want to use it to control the angle/gaze of the camera according to
the angle of the accelerometer - eg if I tilt upwards the camera tilts
upwards the same amount, but when I stop tilting the camera stops moving
- the project involves running the client on a tablet which the user can
point around like a digital camera to 'look' in a particular direction.
This behaviour is captured by the '3D cursor' option but that only seems
to work when in flycam mode. I can live with that, but I'm running into
a problem.
Whenever the accelerometer is flat, it sends '0' from the Y axis
(arbitrary number for explanation) which should always equate to the
camera looking straight forward, parallel to the ground. So if I tilt
the accelerometer up, then tilt it back to flat, the camera should look
up by that amount & then come back to straight forward/parallel to the
ground.
However if I tilt up & back to flat, or down & back to flat, a few
times, the camera begins to drift from the straight forward/parallel
position. The further & more that I tilt up/down, the worse this gets,
until with the accelerometer level & sending '0' along the Y axis, the
camera is pointing straight down at the floor, or even behind the
avatar! The only solution I have come across so far is to do Reset View
& then re-enable Joystick Flycam, which is far from convenient.
Does anybody know what may be causing this? I have set the relevant
deadzones to 0, tried changing feathering & smoothing, changing the
relevant scale, etc. but all to no avail. It's as if the flycam actually
changes what it considers to be 'level' or '0' as it 'moves'?
Regards,
CJ Davies
More information about the Opensim-dev
mailing list