Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: westingtyler on August 25, 2018, 03:37:58 AM

Title: NaN, NaN, NaN in play mode SOMETIMES when pressing crouch?
Post by: westingtyler on August 25, 2018, 03:37:58 AM
Hello. ever since updating to unity 2018.2.4f1 and playmaker 1.9.0, SOMETIMES in play mode when I press crouch button, it freezes play mode and I get this error:

transform.positionWithLocalOffset assign attempt for 'Player - Parent GO (Move)' is not valid. Input positionWithLocalOffset is { NaN, NaN, NaN }.
UnityEngine.CharacterController:SimpleMove(Vector3)
HutongGames.PlayMaker.Actions.ControllerSimpleMove:OnUpdate() (at Assets/PlayMaker/Actions/ControllerSimpleMove.cs:52)
HutongGames.PlayMaker.FsmState:OnUpdate() (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:265)
HutongGames.PlayMaker.Fsm:UpdateState(FsmState) (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2782)
HutongGames.PlayMaker.Fsm:Update() (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1994)
PlayMakerFSM:Update() (at C:/Users/Alex/Documents/Unity/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:579)

Here's a picture. Any reason why? It seems to happen when moving and when standing still sometimes, randomly. Does 0,0,0 count as "not a number" now in vector 3s?
Title: Re: NaN, NaN, NaN in play mode SOMETIMES when pressing crouch?
Post by: jeanfabre on August 27, 2018, 03:01:53 AM
Hi,

 maybe your maths are corrupted:

https://answers.unity.com/questions/1024041/how-can-i-prevent-input-position-is-nan-nan-nan-er.html

https://answers.unity.com/questions/1321874/how-to-fix-transformposition-assign-attempt-for-pl.html

like are you dividing by 0 at some point( your input can be 0)

Bye,

 Jean