Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question oculus controlling other object

Discussion in 'Scripting' started by BloodyHazardous, Jan 14, 2023.

  1. BloodyHazardous

    BloodyHazardous

    Joined:
    Mar 3, 2018
    Posts:
    2
    like the title says, i want to use the oculus controls to control another object and not my own locomotion, ive had a little mess around with the components but its not going my way.
    is it possible, would it have to be all in c#?
    any ideas people?
     
  2. BloodyHazardous

    BloodyHazardous

    Joined:
    Mar 3, 2018
    Posts:
    2
    Found what i was looking for ,in case anyone has wants it.
     
  3. TzuriTeshuba

    TzuriTeshuba

    Joined:
    Aug 6, 2019
    Posts:
    185
    define actions for controller position and rotation in an action map if you dont already have them. declare and serialize InputActionReference variables in a script and poll the position/rotation and respond accordingly. if you already have player hands set up, then you can probably just use the local/global position and rotation of the hand/controller objects