On Mouse Input event issue

Mafradan 4 years ago updated 4 years ago 2


thank you for this incredible tool - first of all.

Then... I'm experiencing an issue when I try to catch 2 mouse events simultaneously (mouse down and mouse hold) in the attempt to track the x distance of the mouse during its movement, starting from the "click" point (something like drag&drop, to give velocity to my character based on the mouse traveling distance).

Ok, I'm new to Bolt and I'm surely wrong somewhere in the flow... but where? and why?

Here you can find the flow and the error Unity displays...

thank you!


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Hi Mafradan! Welcome to the community :)

The output of Set Variable is only available once the control input has been entered.

Instead of connecting this node directly to the B port of Subtract, try connecting B to a Get Scene Variable unit of the same name (MousePos1).

Oh yes! I see :)

thanks so much! I'll try it immediately.