This script is meant to get the mouse delta in world space coords but it doesn’t run completely the second time around. I get the mouse position A in screen space with OnMouseDown and then and mouse position B OnMouseUp followed by the Camera.main.ScreeToWorld(mouseClickA) and again for mouseClickB. This gives me 2 world space positions which I derive the offset vetor by subtracting the second position from the first position. I print these out to a basic GUI.
Everything works fine the first time. The second time around verything after Camera.main.ScreeToWorld no longer updates in the GUI nor the Inspector.
IT ONLY WORKS 1.5 TIMES :? :shock: :? :shock: :? :shock: :!:
t