Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Jontiways on September 17, 2013, 02:17:56 PM

Title: Mouse control. [Help]
Post by: Jontiways 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?
Title: Re: Mouse control. [Help]
Post by: Alex Chouls on September 17, 2013, 02:39:19 PM
Do you have a camera with a MainCamera tag?
Title: Re: Mouse control. [Help]
Post by: Jontiways 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?
Title: Re: Mouse control. [Help]
Post by: jeanfabre on September 20, 2013, 02:29:12 AM
Hi,

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

bye,

 Jean
Title: Re: Mouse control. [Help]
Post by: jeanfabre 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