Mouse Node

Forums 💬 FlowCanvas ⚙️ Support Mouse Node

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21812
    cptgreenwood
    Participant

      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?

      #21817
      Gavalakis
      Keymaster

        Hello,

        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?

        Please let me know.
        Thanks.

        #21816
        cptgreenwood
        Participant

          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.

          #21815
          Gavalakis
          Keymaster

            Hello again,

            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.

            #21814
            cptgreenwood
            Participant

              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.

              #21813
              Gavalakis
              Keymaster

                Thanks for letting me know. I am really glad it worked for you 🙂

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.