playMaker

Author Topic: Using Playmaker with Oculus Rift  (Read 1025 times)

gvaldivia

  • Playmaker Newbie
  • *
  • Posts: 1
Using Playmaker with Oculus Rift
« on: June 01, 2016, 02:32:42 AM »
Hi guys,

I'm trying to use Playmaker to prototype simple interactions using my Rift.

I'm trying to switch to a state when I look at a Game Object with my Rift then go back to the first state when I look at another Game Object.

I added a FSM with a single state to the OVRCameraRig > Center Eye Anchor. In the first state I added a Raycast action that is pointing forward and am storing the hit object inside a variable named RaycastHit.

Then I went to my GameObject and added a FSM with 2 states: deselected and selected, with 2 global events: select and deselect. In the deselected state I added a Game Object Compare action. Game Object: Use Owner, Compare to: RaycastHit.

Then I send the "select" event by choosing Equal event: select.

All that works great! However...

On the "selected" state, I'm using another Game Object Compare action to go back to the "deselected" state but this time, instead of comparing RaycastHit with itself, I'd like to compare it with a different Game Object. However, when I do that, Unity freezes on me.

Why does this happen?

Is this the best way to make something happen when you look at it?