How to jump in VR

Hi I just got an oculus go for my classes, and would love to know how to jump

It is working for me.

Are you talking about copying the demo?

Of course. it would be a nice way of solving the problem of jumping on mobile.

@Stefan Any word on the functionality of this? It’s still the number 1 request for my classes by a longshot.

2 Likes

Can we please see this code (script or coBlocks) - either through open sharing or screenshots added here.

thank you :slight_smile:

Hi @Teacher_bob,

I reproduced this Space so you can remix the shared space and copy the code to your Scene.

If you have any questions or find any bugs, please write here.

1 Like

Hi there! Thank you for the help! I’d like to know if there’s a way to make the visitors can’t jump across walls?

Hi @Nikolay this Space doesn’t seem to be remixable anymore. I’m curious to see how the jump was coded.

Hi @ianostrom,

The CoSpace is remixable if you have a Pro account. This CoSpace is currently remixable.

Regards,
Geoff @ Techleap

Thanks Geoff @techleapnz,

I must have been trying to remix before my pro account was set up. It works fine now.

This is definitely going to be one of those “Just copy and paste this code” situations. :grin: They’re still learning the basics.

Ian

1 Like

Here’s a really simple way to create a jump button for mobile/tablet:

Geoff @ TechLeap

1 Like

Hi Geoff, nice sample! However, I’d like to point that the jump button is not visible in portrait orientation on my phone :slight_smile:

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.

1 Like

@SHUN_HEI_SHUM , there is no space button on a mobile phone / tablet / VR headset.

Geoff @ TechLeap

This is now fixed, ie, button available in both portrait and landscape :slight_smile:

Geoff

1 Like

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.

1 Like

Hiya
We were using this Code successfully recently (before Xmas 2022), but now it doesn’t seem to work :confused: Any idea why? Kids are about to submit their work, and are worried/disappointed that their Worlds no longer work as expected :o
Thanks :slight_smile:
(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')
1 Like