PositionEntity

Blitz3D Forums/Blitz3D Programming/PositionEntity

Baystep Productions(Posted 2005) [#1]
Am I the only one noticing the fact that using PositionEntity with values over 10000 gets out of wack and appears somewhere totaly different?


Mr Snidesmin(Posted 2005) [#2]
That's probably down to floating point accuracy. . . they are only accurate to around 5 or 6 places i think. This means that in the order of 10000 or more you could be off by a few units. . .


Aymes(Posted 2005) [#3]
Ive used values of over 10,000 for positionentity with no problem...

When you say out of wack, "how much" wack are we talking here?


Ross C(Posted 2005) [#4]
Yep, definetly floating point troubles.

Print "100000.0 + 0.1 ="+(100000.0+0.1)

WaitKey()


As you see, the number isn't added because of the rounding involved with floating point numbers. Best thing to do is to scale your world down a bit.


Baystep Productions(Posted 2005) [#5]
Good Idea. Scaling I shall do.