Forum Discussion
khos85
11 years agoExplorer
OVRPlayerController - Jump with Spacebar?
Hi,
I have a question,
I'm using Unity v5.1.1f1, Oculus Utilities v0.1.0, OVRPlugin v0.5.0 , in the OVRPlayerController - how can I make the character controller jump with Spacebar? The script on OVRPlayerController refers to Jump but how to use it? If spacebar is pressed then the Oculus rift overlay shows... Can I just remove a script to get rid of the overlay?
Thanks for any help/advise on this.
I have a question,
I'm using Unity v5.1.1f1, Oculus Utilities v0.1.0, OVRPlugin v0.5.0 , in the OVRPlayerController - how can I make the character controller jump with Spacebar? The script on OVRPlayerController refers to Jump but how to use it? If spacebar is pressed then the Oculus rift overlay shows... Can I just remove a script to get rid of the overlay?
Thanks for any help/advise on this.
2 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionFirst, you can disable the debug info menu by deselecting "OVR Debug Info" on the OVRPlayerController inspector.
To actually make the player jump, you just call the "Jump();" function.
For example, at the end of Update() in OVRPlayerController.cs (around line 213) add:if (Input.GetKeyUp (KeyCode.Space)) {
Jump();
}
In the inspector, I'd also adjust Jump Force to 0.8 and Gravity Modifier to 0.4.
However, the jump functionality is rather bare-bones at the moment, and you will have to modify it significantly to get something usable in a real game. - khos85Explorer
"cybereality" wrote:
First, you can disable the debug info menu by deselecting "OVR Debug Info" on the OVRPlayerController inspector.
To actually make the player jump, you just call the "Jump();" function.
For example, at the end of Update() in OVRPlayerController.cs (around line 213) add:if (Input.GetKeyUp (KeyCode.Space)) {
Jump();
}
In the inspector, I'd also adjust Jump Force to 0.8 and Gravity Modifier to 0.4.
However, the jump functionality is rather bare-bones at the moment, and you will have to modify it significantly to get something usable in a real game.
Oh wow, thanks again cybereality! Much appreciated.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 13 years agoAnonymous