Skip to main content
flarb
Up and Coming
April 18, 2025
Question

Is there a way to disable jumping?

Title says it all--can I disable jumping, in both VR and mobile? I figure in mobile there's a way to remove the jump button?

5 replies

gausroth
Honored Contributor
April 18, 2025

Try setting the players jumpSpeed to 0.

GitHub: https://github.com/Gausroth/HorizonWorldsTutorials.git Discord: https://discord.gg/hNyDQwdw4N YouTube: https://www.youtube.com/@GausRothTutorials
flarb
flarbAuthor
Up and Coming
April 20, 2025

Is there a way to remove the jump button on mobile?

@flarb
New Participant
April 20, 2025
// This script Execution Mode must be set to Local.
import * as hz from 'horizon/core';

class DisableControls extends hz.Component {
  static propsDefinition = {};

  // Automatically called when the world starts.
  start() {
    // Disables the onscreen buttons for the mobile player who is set to the owner of the object this script is attached to.
    PlayerControls.disableSystemControls();
  }
}
flarb
flarbAuthor
Up and Coming
April 20, 2025

So if disable system controls, I can still add my own custom buttons? I want to have one button on the interface but not to jump.

@flarb
gausroth
Honored Contributor
April 20, 2025

Yes you can add your own buttons.

GitHub: https://github.com/Gausroth/HorizonWorldsTutorials.git Discord: https://discord.gg/hNyDQwdw4N YouTube: https://www.youtube.com/@GausRothTutorials