Hey guys im not sure why this error is happening. It might have something to do with me having untiy2017 or i just did something wrong but i dont think i have.
^^^^^ This error happens when i click the ball
Hey guys im not sure why this error is happening. It might have something to do with me having untiy2017 or i just did something wrong but i dont think i have.
First thing to check is your outputs. I suspect the issue lies in the DragEnd method of DragLaunch and the time element as NaN is Not a Number which suggests a division by 0.
Put a debug line for something like:
Debug.Log("launchVelocity="+launchVelocity+" , Duration was="+dragDuration);
Hello i have tried your Debug.Log(“launchVelocity=”+launchVelocity+" , Duration was="+dragDuration); code
and this is what printed
This error happens when i click the ball
Are you holding down the mouse button and the moving the mouse to create the actual drag?
When i click to hold down the error happens.
When you click, is your mouse within the Game window?
Yes, i click on the ball and then the error pops up before i can drag
Can you pop a screenshot up of the Inspector when you have the Touch Input GameObject selected in the Hierarchy please.
Thanks.
You have set both methods for the same event, e.g. Pointer Down.
DragLaunch.DragEnd
, for the event Pointer Down
DragLaunch.DragEnd
in the function dropdown menu
(names may vary between our solutions)
Hope this helps
Oh Yes, Thank you so much
You’re welcome.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.