SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => MiniB3D => Topic started by: JBR on March 28, 2020, 23:10:14

Title: -1.#IND0000
Post by: JBR on March 28, 2020, 23:10:14
Hi, I've been getting this funny thing happen.

The craft is centered at 0,0,0 and I intentionally fly inside the craft to examine vertices/face/lines.

When I do EntityDistance from camera to centre sometimes I get the above as the distance.

The screen goes blank, except the 2D bit, and nothing brings the 3D back.

I suspect I'm too close to the centre?

Jim.
Title: Re: -1.#IND0000
Post by: Henri on March 29, 2020, 14:28:32
Hi,

error seems to imply that something was divided by zero. Not sure if this can be checked in your case before doing the calculation.

-Henri
Title: Re: -1.#IND0000
Post by: markcwm on March 29, 2020, 17:40:09
Yes, seems like an out-of-range value, that on it's own can be fine, but divide by zero (or a very very small number) is known to cause crashes in most languages, why I don't know.
Title: Re: -1.#IND0000
Post by: JBR on March 29, 2020, 19:05:13
Thanks guys,

I'll see if I can code to catch the problem.

Jim.