Here’s a really simple way to create a jump button for mobile/tablet:
Geoff @ TechLeap
Here’s a really simple way to create a jump button for mobile/tablet:
Geoff @ TechLeap
Hi Geoff, nice sample! However, I’d like to point that the jump button is not visible in portrait orientation on my phone
Good point, Pavel! I can’t see any methods or properties which expose the viewport/orientation or allow media-queries, so I’m unsure how to adapt this.
I could try using Ray Cast, or have 2 buttons - do you have any other suggestions?
Geoff @ TechLeap
you can press the space button.
This is now fixed, ie, button available in both portrait and landscape
Geoff
Any word on how to code a Jump button in VR? Maybe using the handset? We have a Quest 2. Students will really love to be able to run their Parkour in VR. thanks.
Hiya
We were using this Code successfully recently (before Xmas 2022), but now it doesn’t seem to work Any idea why? Kids are about to submit their work, and are worried/disappointed that their Worlds no longer work as expected :o
Thanks
(P.S. It would be great if one of the Oculus Buttons could be programmed as the Jump Button - any progress in enabling these in CoSpaces?)
Hi @MrRad, here is fixed version of the space:
If you want to fix existing spaces, then you need to update code in a _createButton()
function.
// Replace the old method which is no longer works
this._jumpText = Scene.createText(0, 0, 0, 'JUMP')
// with updated one
this._jumpText = Scene.createText(new Vector3(0, 0, 0), 'JUMP')