Skip to main content
New Participant
October 22, 2018
Solved

I want to enable jumping on the OVRPlayerController.

  • October 22, 2018
  • 1 reply
  • 788 views
I am a complete starter. I want to enable jumping function on the OVRPlayerController.
I tried, but it does not work. Please take a look at this and let me know what went wrong. T.T

public bool Jump()
{
        bool Jump = Input.GetKey(KeyCode.Space);

        if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
        {
            Jump = true;
        }

        if (Jump)
            MoveThrottle += new Vector3(0, transform.lossyScale.y * JumpForce, 0);
        if (Jump)
            MoveThrottle = (1f + JumpForce) * MoveThrottle;


        return true;
}
    Best answer by hyejunjeong
    I solved the problem thank you!

    1 reply

    hyejunjeongAuthorAnswer
    New Participant
    October 22, 2018
    I solved the problem thank you!