OpenSimulator is only a consumer of camera rotation and doesn't really
affect it at all from the client's perspective. The viewer sends the camera
rotation with every "AgentUpdate" message in the form of 3 direction
vectors (up, left, and forward) which are relative to world space, so the
rotation is more or less absolute and not dependent on prior rotations.
Given such, your application is most likely entirely client-side and you
may find more information in a viewer forum.

Good luck! Sounds interesting :)


On Mon, Mar 26, 2012 at 7:37 AM, CJ Davies <cjohndav...@gmail.com> wrote:

> (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
> ______________________________**_________________
> Opensim-dev mailing list
> Opensim-dev@lists.berlios.de
> https://lists.berlios.de/**mailman/listinfo/opensim-dev<https://lists.berlios.de/mailman/listinfo/opensim-dev>
>
_______________________________________________
Opensim-dev mailing list
Opensim-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev

Reply via email to