unity-game-enginedaydream

Google Daydream Unity3D demo red point NOT on right place when rotate it up or below


I'm want use the red point, which in daydream controller demo, to my project but I find it will be offset to wrong place when rotate it up or below that comparing with a raying.
Raying and the red point will be coincide at beginning. They are in same transform coordinate.

How can I fix red point to the same place of raying?

Thanks


Solution

  • Its not the Unity or daydream's problem.The reason is the raying cast I'm using transform.forward as direction but will be some accumulated error make the raying 20 meter distance position differ the actual value.

    So, replace transform.forward by redPoint.position - cameraPosition as the raying direction can fix this.