dotween icon indicating copy to clipboard operation
dotween copied to clipboard

NaN Input Error

Open seoyeon01 opened this issue 1 year ago • 2 comments

Unity 22.3.13f1

transform.localPosition assign attempt for 'TestObject' is not valid. Input localPosition is { 0.000000, NaN, 0.000000 }.

image

I'm having a similar problem with this. https://github.com/Demigiant/dotween/issues/137

In my case, an error occurs in DOLocalMoveY. When I Debug.Log the value of the Input Value, it seems that there is no problem. However, in DOLocalMoveY, the value of Y is Nan, which causes the problem.

What should I check?

seoyeon01 avatar Apr 18 '24 03:04 seoyeon01

Show code that calls DOLocalMoveY. NaN is usually produced when you divide any number by 0.

Decavoid avatar Apr 18 '24 04:04 Decavoid

Oh, I think I found the cause of the problem. Of course it's my fault, but I think there's room for improvement

Sequence.Insert(insertTime, target.DoLocalMoveY(...)); I'm using this way. The problem is that the value of Y is normal, but the insertTime is NaN. However, DoTween's Log say that the value of Y is Nan! So there was confusion in my search for the cause of it.

seoyeon01 avatar Apr 18 '24 11:04 seoyeon01