How to jump in VR

It is working for me.

1 Like

Are you talking about copying the demo?

1 Like

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

1 Like

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

3 Likes

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

thank you :slight_smile:

1 Like

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.

2 Likes

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?

1 Like

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

1 Like

Hi @ianostrom,

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

Regards,
Geoff @ Techleap

1 Like

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

2 Likes

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

Geoff @ TechLeap

2 Likes

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

1 Like

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

1 Like

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

Geoff

2 Likes

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.

2 Likes

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?)

1 Like

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')
3 Likes

I was able to do a simple tutorial that has worked well with our ClassVR headsets. This does create some other glitches when trying to open things, you also jump but it is working for the students.

1 Like