Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Scottyboombotz on January 05, 2012, 02:05:36 AM

Title: I can't get Touch Object To Work
Post by: Scottyboombotz 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
Title: Re: I can't get Touch Object To Work
Post by: Alex Chouls 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.