- Home /
Tansform.position assign attempt for 'Enemy(Clone)' is not valid. Input position is {NaN, NaN, NaN}
From my research I can see I am getting a vector issue (it looks like I divide by 0 but I dont do an divisions in my script).
I checked every script I have for positions and tried to catch it between trace statements. Couldnt do it. It looks like its in some update or fixed update but I have no clue where.
This error comes up SOMETIMES right as an enemy is killed.
I feel it has something to do with its position. Clicking on this error does nothing, but SOMETIMES it highlights the gameobject that got the bad transform passed to it.
Is there somewhere in your code I could get getting a NAN vector that I can look for?
Right as an enemy dies I will get a lot of these, and once its dead (destroyed) this problem goes away. It will play through a bit of animation, triggering the error each frame, and then when the enemy dies the error stops.
Clicking the error will only highlight the gameobject but will not open to a script where this occurs.
It comes up maybe 1 in 5 times whenever an enemy is killed...
We would need to see your code. Dividing your position by 0.0 might cause this problem.
Thats the thing, I dont even know what script this is occuring in. I put trace statements in as many of my scripts as I could think would even attempt to set position. Is there a way to get the game to do a break when this occurs in unity? If I could find the line I could fix this...
Your answer
Follow this Question
Related Questions
Standalone CTD (Access Violation) - Making sense of "error.log" files? 0 Answers
Unity editor crash Problem "Access Violation (0xc0000005)" 3 Answers
Access Violation (0xc0000005) 0 Answers
Method Must have a Return Type (Vector3 x,y,z) 2 Answers
Cannot implicitly convert type 'int' to 'UnityEngine.Vector3' 3 Answers