Skip to main content
New Participant
January 31, 2017

I can't get the player to move in the roll-a-ball VR tutorial

I finished the Unity tutorial for Roll-a-Ball (https://unity3d.com/learn/tutorials/projects/roll-ball-tutorial), then continued with the Oculus tutorial 'Build a Simple VR Unity Game' (https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-build/#unity-build).

However, I cannot get the player (ball) to move. Any clues? I am as new to this as can be, so I'm thinking it might be something pretty obvious.

I am able to configure the project where the camera is not a child of the player, and there is no player constraint to freeze rotation - build and gameplay work fine, just the camera doesn't move. How do I get both the ball to move and the camera to move with it?
    This topic has been closed for replies.

    7 replies

    jcapelaAuthor
    New Participant
    February 1, 2017
    I believe the unity thread refers to folks who can't get the ball to move in the original unity tutorial. i'm able to complete the unity tutorial just fine; everything builds and plays as expected. my problems start when I try to make the roll-a-ball game work in VR with the steps in the oculus tutorial.
    Participant
    February 1, 2017
    Would you mind posting the FixedUpdate() code in your PlayerControllers.cs. 

    Also how are you trying to control the ball?
    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations. Having an issue with our platform, services, or integrations? Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
    jcapelaAuthor
    New Participant
    February 1, 2017
    I've tried moving the ball via keyboard arrow keys and via asdw keys (these work fine on the pre-VR build) as well as xbox controller joysticks. 

    my FixedUpdate() below.
    -----


        void FixedUpdate ()

        {

            float moveHorizontal = Input.GetAxis ("Horizontal");

            float moveVertical = Input.GetAxis ("Vertical");



            Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);



            rb.AddForce (movement * speed);

        }


    -----

    Participant
    February 1, 2017
    A couple things. 

    Have you enabled Virtual Reality Support in the Project Settings -> Player -> Other Settings
    Are you using the Play mode in the Unity Editor to test your app? 
    Can you post a screenshot of the Inspector Panel (with Player object selected)?
    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations. Having an issue with our platform, services, or integrations? Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
    jcapelaAuthor
    New Participant
    February 1, 2017
    here is a screenshot of my player settings. I tried to attach PlayerController.cs but apparently the file type is not supported for upload.

    jcapelaAuthor
    New Participant
    February 1, 2017
    OK, so I've rebuilt the original unity tutorial from scratch and I am able to follow the oculus tutorial steps to make it work in VR. i'll chalk up my previous effort's failure to user error. i'm still not sure how I was able to have a working version before the VR steps that failed afterwards; i'll chalk that up to voodoo. thanks, everyone, for your help.
    Participant
    February 1, 2017
    That's good to hear.

    If you can remember any differences between your first and second try that may help others or want to suggest improvements to the documentation that would be great.
    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations. Having an issue with our platform, services, or integrations? Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.