Mike Pape
Mike Pape

Reputation: 651

How do I properly teleport a player in Unity with the Daydream controller?

I am trying to teleport the user in Unity 2017.2.1f1 using the Google VR SDK, but when the user is put in the new position, the Daydream controller is pointing in a weird direction and doesn't match the actual orientation of the controller (emulated or on a real device).

The MainCamera is nested under Player. The GvrControllerPointer is also nested under Player. I am moving the Player GameObject with the following inside the teleport GameObject:

public void OnPointerClickDelegate(PointerEventData data) {
    mPlayer.transform.position = new Vector3(transform.position.x, mPlayer.transform.position.y, transform.position.z);
}

Player is at (0, 6, 0), while the MainCamera and GvrControllerPointer are both (0, 0, 0).

Upvotes: 0

Views: 577

Answers (1)

Mike Pape
Mike Pape

Reputation: 651

I was able to fix by disabling the colliders when I was on the warp I teleported to. It seems like the controller/laser/reticle was colliding with the collider the player was standing on.

Upvotes: 0

Related Questions