Search Unity

Other Tilt Canvas Based on Touch Position

Discussion in 'VR' started by jae026, Apr 3, 2022.

  1. jae026

    jae026

    Joined:
    Oct 29, 2016
    Posts:
    68
    Hey guys. I am working on a VR title using the XR Rig and wanted to know if anyone had any pointers about manipulating a Canvas rotation and position based on the point of contact.

    Imagine a 400 X 400 canvas with its pivot in the dead center. If I touch any corner then the UI tilts towards that corner and returns to original rotation after finger/raycast is lifted. If I touch the dead center then the UI doesn’t tilt but just pushes inward a bit and returns to original position after the finger/raycast is lifted.

    Now I am using the XR rig and would love to find a way to interact with just my fingers. Haven’t figured this part out yet.

    is is as simple as a hinge and a spring attached to the canvas with limitations on the dampen, rotation and a position?


    Not a noob just looking for insight and ideas.
     
  2. jae026

    jae026

    Joined:
    Oct 29, 2016
    Posts:
    68
    Leaning toward a rigidbody hinge spring setup for prototyping
     
    ROBYER1 likes this.
  3. jae026

    jae026

    Joined:
    Oct 29, 2016
    Posts:
    68
    Man the boards are dry around here lol. Is my post in need of a revision? Did I word it correctly?
     
  4. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Maybe try asking in the official Unity Discord server? :)
     
  5. jae026

    jae026

    Joined:
    Oct 29, 2016
    Posts:
    68
    Thanks. I totally forgot about that!!