Jump to content

Doubles, when to use them?


photo

Recommended Posts

Usually, we work around the world origin, so we never run into troubles re. precision.

Now, with the new Terrain, I moved the camera to the Terrain Center which is approx. 10000 units from Origin.

Our camera calc. seems to run out of precision, as it is jittering when calculation the position and lookat.

Can this be the case? From when - distance to origin - is it best to start using doubles?

Thx.

W.

ps. I solved the issue, by moving the terrain layer to origin, as well the content.

Still, please answer the q ;)

Edited by werner.poetzelberger
Link to comment

We were using single in 12*12km terrain and we didnt experienced any issues. Now we are on double just to be sure, but my guess is, that for some cases even single should be OK.

Link to comment

12x12 km, you probably put the origin in the center of your world?

I have a 28x22km Terrain and was in the geometric center (camera), the origin I had in the lower left corner (as I thought I cannot move the terrain uhm, hehe).

So as silent mentioned, from 10 km OFF the Origin.

But it was only visible in the camera calculation (as the image was shaking). E.G. Character animation and positioning was fine too.

best.

Link to comment
3 hours ago, werner.poetzelberger said:

12x12 km, you probably put the origin in the center of your world?

I have a 28x22km Terrain and was in the geometric center (camera), the origin I had in the lower left corner (as I thought I cannot move the terrain uhm, hehe).

So as silent mentioned, from 10 km OFF the Origin.

But it was only visible in the camera calculation (as the image was shaking). E.G. Character animation and positioning was fine too.

best.

No, terrain had corner at 0,0,0 :)

Edited by demostenes
Link to comment

Interesting. So we should try to figure out some day, what caused the jittering.

We have some own code for the camera. 

Just a luck, that we stay in place ;).

cheers

Link to comment
×
×
  • Create New...