playMaker

Author Topic: Trouble making a large enough area for a space shooter sim. Help?  (Read 2119 times)

Monkee05

  • Playmaker Newbie
  • *
  • Posts: 3
Hey guys, Ive been searching unity answers and also the Playmaker forums here to find a solution to the problem I'm having but unsuccessful so far. Basically I have my spaceship (6 units in length) all setup and works great flying around the scene near the world origin. However due to floating point limitations I believe, once the player flies away from the origin, about a few thousand units, (which is quite easy with the speed of the ship) the accuracy of the ship's model begins to suffer and jitters more and more the further away from 0,0,0 the player is.

I've tried things like get player's ship position, if 1000 on +Z, move ship back to 0 Z (world origin) and then shift a gameObject containing the scene's objects back 1000 units but even with "Late Update" ticked for both set position actions, I get a flicker of the scene and seems to be inaccurate.

Also reading more, it seems like the better method instead of moving the ship is to move the world around the ship which makes a lot of sense. However things like collisions, trail effects ( a problem in shifting the scene as well), lightmapping,  ai path finding, and multi-player seems to be a even bigger problem.

I was just wondering if anyone else here had similar issues, any suggestions or help with overcoming this? any tips even would be a massive help, thank you.

- Chris

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trouble making a large enough area for a space shooter sim. Help?
« Reply #1 on: August 20, 2012, 03:23:28 AM »
Hi,

 I am not sure that it is indeed because of floating points that you have these problems. It might be more related to scene rendering ( totally subjective, not sure actually)

 Have you tried downscaling everything, instead of 6 unit, make it 0.6 unit

Also make sure that your models are all unscaled. I seem to recall that it gets very difficult for the rendering engine when meshes are scaled. So when I say scale down, I really mean that you make your models smaller, not just changing the transform scale.

bye,

 Jean

Monkee05

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Trouble making a large enough area for a space shooter sim. Help?
« Reply #2 on: August 20, 2012, 12:02:14 PM »
Hi there,

Yes the assets are currently scaled in the engine. Hmmm great suggestion. I'll re export my assets smaller and use a scale factor of 1.0. Ill repost here and mark it solved if it does the trick.
Thank you so much Jean for you help mate :)

- Chris