GodotVR / godot-xr-tools

Support scenes for AR and VR in Godot
MIT License
493 stars 69 forks source link

Support Walk/Jog in Place Locomotion #527

Closed QuinnLeavitt closed 9 months ago

QuinnLeavitt commented 11 months ago

I'm not sure if this is something that we would want to have in the tool plugin itself but I was thinking we could have a locomotion that's based on the natural sway of your head/controllers while walking or jogging in place combined with controller sticks for turning and directional inputs as an alternative locomotion option. The benefit of this over the traditional vr locomotion controls is that it's better for exercise or high immersion games and also would be less likely to cause motion sickness due to the player's movement in real life corresponding to their movement in vr.

It would be similar to what Nimsony created on his youtube channel for unity. I'd like to get started on helping with development on this repository and I'd be more than willing to try and figure this and other issues out.

If this is something that is out of scope for the plugin or there are other concerns please let me know.

teddybear082 commented 11 months ago

I had put an attempt together a long time ago for Godot 3; it worked with Quest but for some reason higher refresh rate headsets like index I could never get it working. If you’re good with math maybe there is some way of updating this to Godot4 and getting this going:https://github.com/teddybear082/Godot_XR_JogInPlace_Locomotion

also I think this is in scope for the plugin it just needs to be implemented with the same form / format / coding guidelines of other movement providers (check out the direct movement node), probably yours could be called jog_movement or similar. Your movement code should then act on the PlayerBody node.

QuinnLeavitt commented 11 months ago

Ok thanks so much for the tips and sharing your old project, I'll see if I can get something going with this. I'm not the best at math but I'm pretty determined so I'll give it a shot. I also have an index so I'll be able to make sure it works on higher refresh rate headsets.

Malcolmnixon commented 10 months ago

I had put an attempt together a long time ago for Godot 3; it worked with Quest but for some reason higher refresh rate headsets like index I could never get it working. If you’re good with math maybe there is some way of updating this to Godot4 and getting this going:https://github.com/teddybear082/Godot_XR_JogInPlace_Locomotion

also I think this is in scope for the plugin it just needs to be implemented with the same form / format / coding guidelines of other movement providers (check out the direct movement node), probably yours could be called jog_movement or similar. Your movement code should then act on the PlayerBody node.

@teddybear082 Could you check out the https://github.com/GodotVR/godot-xr-tools/pull/555 pull request and see how well it works for you.

QuinnLeavitt commented 2 months ago

Thank you for completing this @Malcolmnixon! It will be a huge help to my project. If I find some ways to improve this, while still keeping it generic enough for other projects, I'll be sure to open a PR for it.