Hi. I have a problem with the Mouse Node. When I start my programm, there is a sphere and everytime I click on it, the sphere grows. If a size of 5 is reached the sphere is destroyed. If I use the “Input/Mousebutton/Down” everything is working nearly fine, the only problem: Every mouseclick fires the event even if I dont hit the sphere. Then I used “Object/Mouse/Down” and defined the Sphere as collider. Now I get an Error (NullReferenceException) as soon as I move the mouse cursor over the sphere, clicking does not work. –> see attached screenshot
What do I do wrong?
Hmm. Can you please post for me here the full null reference exception log?
Also, is the FlowScriptController attached on the Sphere gameobject itself?
Is it a Bound Graph, or an Asset Graph reference?
I attached a screenshot of the log. This (66 entries) happened, when I moved the mouse cursor on the sphere, no cklick.
The FlowScript is attached to the spehere and it is a bound one.
Thanks for the log.
Hmm. I see what is the problem now. The Mouse Event node right now requires a MainCamera to store “Hit Info” in case you require them (“info” output port), thus a Camera with the “MainCamera” tag set. As I understand though, there must be no such “MainCamera” in your scene.
I have just fixed the error to check for if the MainCamera is null and attached the package for you here. The events will work fine, but the “Info” output port will not contain any data if there is no MainCamera.
If however you set your camera’s tag to “MainCamera”, the “Info” output port will also contain useful data.
In both cases, the events will though now work 🙂
Please let me know things work for you after you import the attached package.
Thanks.
Thanks, this is the solution. Without the provided package tagging the “Main Camera” does the trick (unfortunately the camera in the Unity 3D Template is untagged) and with your package it works even without tagging.