Newton with full sized planets

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton with full sized planets

Postby JohnM » Mon Nov 10, 2008 1:00 pm

I'm making a game with full sized spherical planets thousands of kilometres in radius, which will have the ability for players to walk and drive around on the surface etc. The problem I'm having is that the player avatar falls through the planets surface when I increase the planet's radius to more than 100 kilometres or so - up to that point it works fine. I'm using a 1 unit = 1 metre scale, and the player avatar is 2 metres in size. The planet is a TreeCollision made from a large triangle mesh and the avatar is a CollisionPrimitives::Box.

I know that Newton has limits to the size of the world coordinates especially in single precision mode which is what I am using (this is because I'm using OgreNewt and that only supports single precision Newton). Is there anything I can do to make collision detection work properly with full size planets (thousands of kilometres in radius), either using single precision Newton or upgrading to Double precision Newton. Will switching to double precision Newton completely fix the problem?
Posts: 1
Joined: Mon Nov 10, 2008 12:43 pm

Re: Newton with full sized planets

Postby JernejL » Mon Nov 10, 2008 3:50 pm

it will improve the situation but i doubt it can becompletely eliminated, since there is a physical limit on how much stuff you can reprisent into 32 and 64 bit floating points, precision is not really guaranteed in floats, this is not a newton limit but rather how binary numbers work.
Help improving the Newton Game Dynamics WIKI
User avatar
Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests