playMaker

Author Topic: Mouse control. [Help]  (Read 2116 times)

Jontiways

  • Playmaker Newbie
  • *
  • Posts: 4
Mouse control. [Help]
« on: September 17, 2013, 02:17:56 PM »
Hello, I'm quite new to playmaker, so if I mention something that is particularly  newbish, that is most likely why. Appologies before hand.
I am currently trying to make a mouse controller on an object. I am having trouble doing so.


I have followed this tutorial trying to get the object to follow the mouse. However when I set it all up and press play, unity automatically pauses and gives me a NullReferenceException.

This is the error:
Quote
NullReferenceException
UnityEngine.Camera.ScreenToWorldPoint (Vector3 position) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/Editor/UnityEngineCamera.cs:351)
HutongGames.PlayMaker.Actions.ScreenToWorldPoint.DoScreenToWorldPoint () (at Assets/PlayMaker/Actions/ScreenToWorldPoint.cs:83)
HutongGames.PlayMaker.Actions.ScreenToWorldPoint.OnUpdate () (at Assets/PlayMaker/Actions/ScreenToWorldPoint.cs:64)
HutongGames.PlayMaker.FsmState.OnUpdate ()
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.Update ()

If this problem has already been addressed could someone link me to it, or suggest a fix, or even send me a working version or example?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Mouse control. [Help]
« Reply #1 on: September 17, 2013, 02:39:19 PM »
Do you have a camera with a MainCamera tag?

Jontiways

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Mouse control. [Help]
« Reply #2 on: September 17, 2013, 02:56:07 PM »
No I dont I have it just as camera.

I have sorted this problem out to some extent. But I will most likely be having another look at it tomorrow.
Ill post my work and whats happening once the work I am doing for this has developed a bit.

Is there an introduce yourself on this forum at all? or a place where I can post an introduction?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse control. [Help]
« Reply #3 on: September 20, 2013, 02:29:12 AM »
Hi,

 Uhm, I think there was a section, I will enquire.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse control. [Help]
« Reply #4 on: September 20, 2013, 03:07:16 AM »
Hi,

 found it, it's a thread actually:

http://hutonggames.com/playmakerforum/index.php?topic=4.0;topicseen

bye,

 Jean