However I’m not sure if it works 100% correctly.
When my mouse is directly over the target, the balls miss (the difference is bigger when further away from the center):
But this might be an issue with the demo or the browser or whatever and not the logic node itself.
I would suggest another layout to this node considering its usability:
Two integer inputs (X and Y) – mouse and its coordinates nodes are not more a “vector”, but a separated vector.
The output is better to be X and Y floats to avoid confusion, because the Y coordinate may be commonly applied to a Z coordinate in 3D space object or whatever.
World coordinates are points in 3D space that have all three coordinates. For World, the Z value will be equal to the Z value of the camera.
Direction is a vector that goes from the camera position in the direction the cursor is pointing. For the second demo, I just took this vector, multiplied it by the velocity and assigned it to the object via Set RB Velocity.
The user will never get null.