Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Turning table

Discussion in 'AR/VR (XR) Discussion' started by MultiMediaTeamBrno, May 18, 2018.

  1. MultiMediaTeamBrno

    MultiMediaTeamBrno

    Joined:
    Jan 17, 2018
    Posts:
    10
    Probably a silly question but I was not able to find any solution.
    Let's say I;ve got a scene with rounded table in the center which I want to point by laser wich is cast from controller, and then when I push the trigger and move the laser, to turn table accordingly in one axis.
    I guess this should be relativelly easy, but don;t know how to transform the RaycastHit.point.transform.position to table rotation in Y axis.
    I guess there should be some example scripts as well but haven;t found any yet.