playMaker

Author Topic: I can't get Touch Object To Work  (Read 2842 times)

Scottyboombotz

  • Playmaker Newbie
  • *
  • Posts: 9
I can't get Touch Object To Work
« on: January 05, 2012, 02:05:36 AM »
I hooked up a cube to send an event to pass to a new state when 'Touch Object' happens.  The event never triggers, and I get this error.

NullReferenceException
UnityEngine Camera_ScreenPointToRay (Vector 3 position)
HutonGames_Playmaker_Actions.TouchObjectEven t.OnUpdate 0 (at Assets/Playmaker/Actions/TouchObjectEvents.Cs:89)
HutongGames.Playmaker.FsmState.OnUpdate()
HutongGames_Playmaker.Fsm.UpdateState (HutongGames. PlayMaker.FsmState state)
HutongGames.Playmaker.Fsm.Update()
PlayMakerFSM.UJpdate()

What does this mean, and how can I get Touch object to work?

-Scott

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: I can't get Touch Object To Work
« Reply #1 on: January 14, 2012, 07:42:07 PM »
Sorry for the delayed response. My guess is that you don't have a camera tagged as the MainCamera. Try adding that tag to the camera.

I'll add some error checking to the action to check for this.

Let me know if that fixes it.