Big NAN Troubles ...

Blitz3D Forums/Blitz3D Programming/Big NAN Troubles ...

Are you feeding a raw mousespeed into rotateentity or are you scaling it first? Maybe the scalefactor is being set to zero for some reason producing Infinity. Not very likely though, grasping at straws now :)

Anyway I have just confirmed that if say you are rotating a pivot which is the parent of player and you feed that Nan or Infinity then the global position of player will be reported as Nan as I suspected.

So you may want to test for infinity as well, or at least division by zero. Ross has a point as well, look out for overflow producing Infinity.

BTW. I think it was Michael Reitzenstein who posted a neat way to define NaN and Infinity as constants...
Const Infinity# = (999.0)^(99999.0), NaN# = (-1.0)^(0.5)