instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 17, 2018, 08:26:00 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Oculus DK1 + Wiimote interaction  (Read 1900 times)
natibu
Newbie
*
Posts: 2


View Profile
« on: January 17, 2015, 04:38:38 pm »

Dear forum members,

I am quite new with instantreality and x3d. But I recently started working on my first little project and I have an issue which keeps me busy and I suspect there is a very simple solution:
I would like to watch a 3D-scene with an HMD (Oculus DK1) and navigate through it with a controller (wiimote).
So far I managed to connect the Oculus DK1 and viewed the classroom scene (provided by instantreality) as expected.
I also wrote a script which assigns translations to the steernavigator according to the pressed buttons on the wiimote. It worked very fine without the oculus.

But after adding the OVR routes, the orientation from this node seemed to overwrite the translation made with the wiimote.

I recognize, that there is a small translation if I press the wiimote-buttons. But it is only a step in the desired direction and this single step onla remains as long as I keep pressing the button. After releasing it, I jump back to the default position. Which means I am stuck. I can only wiggle around.

This route causes the corrupted wiimote translation:
<ROUTE fromNode='ovr' fromField='Orientation' toNode='viewpoint' toField='orientation'/>

The routes for my translation of the steernavigator are these:
<ROUTE fromNode='script' fromField='zTranslation' toNode='nav' toField='set_zTranslation'/>
<ROUTE fromNode='script' fromField='xTranslation' toNode='nav' toField='set_xTranslation'/>

Is there a possibility to make my translation working again? One idea I had (which would be my very last try) is to split up the orientation input in rotation values and assign those rotations to the steernavigator, like I did with the translation.
Like:
<ROUTE fromNode='script' fromField='zRotation' toNode='nav' toField='set_zRotation'/>
<ROUTE fromNode='script' fromField='xRotation' toNode='nav' toField='set_xRotation'/>
.
.
.

I hope there is an easier way I just oversaw Cheesy I hope you can give me some ideas and I will provide you with more information if necessary. You can find the script in the attachments (3D scene not included).

Best regards,
Natascha
« Last Edit: January 17, 2015, 04:44:46 pm by natibu » Logged
natibu
Newbie
*
Posts: 2


View Profile
« Reply #1 on: January 20, 2015, 07:50:18 pm »

Alright I solved the problem.
The example from the oculus-tutorials showed the solution, where the FSRotation from the Oculus is routed directly to the viewpoints orientation.

But now I used the SpaceNavigator to manipulate the viewpoint. I just routed the orientation from the oculus to the rotation field from the SpaceNavigator. So now I am using a SteerNavigator for translations and the SpaceNavigator for rotations.

<NavigationInfo type='"walk" "any"'>
   <SpaceNavigator DEF='spaceNav'/>
   <SteerNavigator DEF='nav' inputRange='-1 1' rotationSpeed='0 0.1 0'  translationSpeed='1 1 1'/>
</NavigationInfo>
.
.
.
<ROUTE fromNode='ovr' fromField='Orientation' toNode='spaceNav' toField='rotation'/>
...
<ROUTE fromNode='script' fromField='zTranslation' toNode='nav' toField='set_zTranslation'/>
<ROUTE fromNode='script' fromField='xTranslation' toNode='nav' toField='set_xTranslation'/>

Best regards,
Natascha
« Last Edit: January 20, 2015, 07:54:53 pm by natibu » Logged
tfranke
Administrator
Jr. Member
*****
Posts: 89


View Profile
« Reply #2 on: January 26, 2015, 10:32:49 am »

Hello Natascha,

sorry for the late reply. Good thing you solved your problem and posted the answer here, thank you!

Cheers
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines