Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Moving/flying freely in VR model? (using Oculus Rift and Xbox-control)

Anonymous

Moving/flying freely in VR model? (using Oculus Rift and Xbox-control)

Anonymous
Not applicable

Hi!

 

I'm using Stingray and creating VR-models. I want to be able to "move/fly around freely" in my level, preferably using an Xbox-control (or maybe keyboard + mouse) while in Oculus Rift. By following Paul's great tutorials (linked below) I'm able to move in X- and Y-axis using the left thumbstick on my Xbox-control. However, the tutorial doesn't explain how to add the movement of up and down. So I freestyled an additional piece of Flow-code for the right thumbstick, affecting the Z-axis, but I haven't changed any code in lua for this. The problem I have is that I can't use both thumbsticks simultaneously, everytime I move a thumbstick I jump back to the starting position of my level. But independently the thumbsticks work as they should. Does anyone know how to combine the thumbsticks so they can work simultaneously? I attached screenshots of how it looks in Flow. The lua code is the same as in Paul's tutorials.

 

Paul's tutorials that I mentioned above:

https://www.youtube.com/watch?v=GVB7JFH_dMo

https://www.youtube.com/watch?v=7pjDbmVH0uE&feature=youtu.be

 

Thank you and best regards,

Victor

Reply
Reply
0 Likes
Reply
Accepted solutions (1)
1,772 Views
5 Replies
Replies (5)

Anonymous
Not applicable

Tricky to say without really sitting down on the project myself, but on just a glance it looks like you're not passing the z axis of the current tracking space when you're using the left stick and not passing the x and y of the current space for the right stick. 

 

Only your left stick flow i'd try connecting the z vector components from your oculus get tracking space to the z in the vector from components after the addition nodes. I think what your're basically doing a the moment is resetting the z axis to 0 whenever you use the left stick, so just passing it through from what it currently it should help. 

 

And the same goes for your right stick, connect up the x and y from the vector components to the vector from components down the line. 

 

See what that does!

Reply
Reply
0 Likes

IMDesigns
Participant
Participant
Accepted solution

I've implemented that. Feel free to use mine, I also learned from Paul. You've run into a common mistake (I also did that) with your Right Stick, in the first Vector Components, you should use Y instead of Z to control height (no need to use rotation by the way) and X if you want to turn with the controller as well.

 

Let me know if that solved your issue.

 

Best regards, 

Reply
Reply

Anonymous
Not applicable

@IMDesigns wrote:

I've implemented that. Feel free to use mine, I also learned from Paul. You've run into a common mistake (I also did that) with your Right Stick, in the first Vector Components, you should use Y instead of Z to control height (no need to use rotation by the way) and X if you want to turn with the controller as well.

 

Let me know if that solved your issue.

 

Best regards, 


Thank you! Your code works perfect for my project!

 

Best regards,

Victor

Reply
Reply

Shawn_Hendershot
Participant
Participant

Does anyone know how to change from using the xbox Thumbstick for fly mode to using the Oculus thumbstick inputs?  I have the xbox controller working perfectly.

 

 

Reply
Reply
0 Likes

Anonymous
Not applicable

I also tried following the tutorials of Paul, however I keep getting this error with the HTC Vive when moving the thumb stick of the XBOX controller. Does anyone have an idea how we can solve this error? 

 

Test Engine / SteamVRPlugin: SteamVR.set_tracking_space_pose(Matrix4x4) is deprecated. Use SteamVR.set_tracking_space(Vector3, Quaternion, Vector3) instead.
Reply
Reply
0 Likes