Stylus position on Unity Scene

0 votes
asked Mar 22 by jacuna (12 points)
Hello. I have problems trying to render the stylus beam on Unity. Even in the examples provided, it has a certain angle which is really disorienting for the users, since the stylus tip isn't accurately represented on screen. Do I have to use the native functions of the plugin instead of using the provided Unity Script to correct this issue? I have been reading other questions here, and it seems I need to redefine the viewport, but I have no idea how to do that with the provided Unity Script, since it does it automatically. Thanks for your attention.
commented Mar 22 by AlexShorey (200 points)
Hi Jacuna,

The issue you're experiencing doesn't sound right. There shouldn't have to be any manual intervention of the viewport to make the stylus display correctly with the Unity zCore plugin. Could you describe the specific circumstances which lead to a disorienting stylus?

Alex S.
commented Mar 23 by gdl (20 points)
Hi Alex, I'm having a similar issue. The rendered stylus beam origin doesn't start from the physical stylus tip  but slightly further away on the right or left so the rendered beam appears weirdly "angled" from a user point of view. (  zspace 200 & WIn7, zCore 5, same behavior with the previous zCore ) .
It looks like the  virtual and physical spaces are not synced/calibrated properly scale-wise : I also tested with objects  constantly looking at the head position , they were not looking at my actual head, but at a point situated between my head and the screen.  Changing the zcore scale factor didn't help.  Provided samples or new apps show same behaviors.
commented Mar 23 by jacuna (12 points)
edited Mar 23 by jacuna
Sorry, I didn't explain very well my problem at hand. This happens when head tracking is disabled and / or the scene has fallen back from stereo to mono rendering. The stylus remains at an angle. I tried moving the camera, but the stylus remains at an angle in relation to the mono rendered scene, and also tried rotating the stylus position but it doesn't work as expected (I see in the debug gizmos that the camera viewport and the display representation don't quite match up, and the mismatch results in the stylus beam not being accurately displayed in mono mode). I have the requirement to be able to use the app even if stereo is not enabled or when the glasses are not in use due to some users reporting having headaches for using stereo, and they still want to use the stylus for operating the app, because of its 6dof.

Edit: Further testing, with head tracking enabled but stereo disabled, shows me that the Stylus direction, returned by the plugin, is dependent of the display angle and the glasses position. Is there some assumed glasses's position when head tracking is disabled or the glasses are out of range?
commented Mar 23 by AlexShorey (200 points)
I see. Well, without at least the glasses to track the users head, there's no way for the stylus or the overall scene to align with the users perspective and stylus interaction therefore won't be intuitive. The best advice I can give would be to maintain that the user must wear the glasses, and disable stereo by setting the IPD value to zero. That way the head is still tracked and the stylus can maintain some semblance of alignment with real space. If you absolutely need the stylus to make sense without glasses, then you're in uncharted territory and will have to get creative.

Yes, when the glasses are out of tracking range, the stereo camera tracks back to a default centered position. I recommend taking a look at ZCore.cs "ComputeDefaultHeadPose()" to get a sense of how its coming up with the coordinates for that position.
commented Mar 23 by jacuna (12 points)
Thank you Alex. With this bit of info we can, at least, re-evaluate the scope of that particular requirement.
commented Mar 23 by AlexShorey (200 points)
gdl, I haven't heard of or experienced this issue. To clarify, is your issue occurring in normal, head tracked stereo?

Are there any demos, outside of Unity that you've tried that don't experience this issue? I'm trying to narrow down whether this is isolated to Unity, or is system wide.

I'm unsure of why your pointing script would be suggesting that the tracked head position is ahead of the camera positions. Could you share a snippet of how you're pointing to the head?

Also, could you share what zSpace "System Software" version you're on?
commented Mar 26 by gdl (20 points)
Hi Alex, starting another thread on this.

1 Answer

0 votes
answered Mar 23 by AlexShorey (200 points)
See comment thread,

Without at least the glasses to track the users head, there's no way for the stylus or the overall scene to align with the users perspective and stylus interaction therefore won't be intuitive. The best advice I can give would be to maintain that the user must wear the glasses, and disable stereo by setting the IPD value to zero. That way the head is still tracked and the stylus can maintain some semblance of alignment with real space. If you absolutely need the stylus to make sense without glasses, then you're in uncharted territory and will have to get creative.
...