Hey guys,
I am working on a pause menu and I am having this strange error. When I load the level at first it works perfectly but when I restart the level I get the following error when trying to move my character.
" transform.localPosition assign attempt for ‘CameraOffset’ is not valid. Input localPosition is { NaN, 1.000000, -0.000000 }."
I am using the standard third person controls and I use the following code to restart the level:
function OnClick (){
if (trigger == RestartTrigger.OnRelease){
Timer.timeStarted = false;
Timer.timer = 0;
Application.LoadLevel(Application.loadedLevel);
}
}
This is attached to a button from NGUI.
Is there someone that is familiar with this error? Help and suggestions are very much appreciated.
Kind Regards,
Max Uijlings