Bastiaan Olij | Dev stream 44 - An alternative setup for CharacterBody3D in Godot VR @BastiaanOlij | Uploaded December 2022 | Updated October 2024, 19 hours ago.
In this stream we build the basics of a setup where a CharacterBody3D forms the basis of our XR setup. The XR setup is added on top of the CharacterBody3D. We then write the code that continuously moves the CharacterBody3D node to the current location of the player by adjusting the XROrigin3D node. We detect collisions along the path so if the player physically tries to move through a wall we deal with that appropriately.
The whole setup ensures you can control the player in the same way as you would in a non-XR game.
You can find the branch with the code written during this stream here:
github.com/BastiaanOlij/godot4_openxr_demo/tree/PlayerBodyTest
This is all written in Godot 4 but the code should be very similar in Godot 3.x
Follow me on twitter for updates: twitter.com/mux213
Consider supporting me on Patreon: patreon.com/mux213
Please consider subscribing to my channel if you enjoyed the content.
In this stream we build the basics of a setup where a CharacterBody3D forms the basis of our XR setup. The XR setup is added on top of the CharacterBody3D. We then write the code that continuously moves the CharacterBody3D node to the current location of the player by adjusting the XROrigin3D node. We detect collisions along the path so if the player physically tries to move through a wall we deal with that appropriately.
The whole setup ensures you can control the player in the same way as you would in a non-XR game.
You can find the branch with the code written during this stream here:
github.com/BastiaanOlij/godot4_openxr_demo/tree/PlayerBodyTest
This is all written in Godot 4 but the code should be very similar in Godot 3.x
Follow me on twitter for updates: twitter.com/mux213
Consider supporting me on Patreon: patreon.com/mux213
Please consider subscribing to my channel if you enjoyed the content.