Hi, I’m trying to make a simulator game. And I’m not reading a lot on this subject (cant find a solution link)
I have the problem that my character and vehicle start shaking and moving in my map.
What i was looking is that in space simulation is possible to make a planet small and large.
I’m making a 2000km map and in my case this is not possible to make smaller the planet.
I’m loading the maps but i can’t reach then with out vibrations and shadow flickering.
I was thinking to reset them but this means moving all my world, and fixed rigid body.
I did not try this solution. Before starting,
Is there a common typical solution for this?
Same tip, info idea or link to other talks about can help.
Thanks
Generally for a very large world you need to reset the player to the origin and shift everything around him. This is because of the limited precision of floating-point numbers. The further you get away from the origin, the less precision you will have; this is an inevitable result of how floating-point numbers are represented.
It’s definitely floating point precision. The problem occurs whenever you use small numbers, like the distance your character is trying to move each frame, along side large numbers, like the distance from the origin.
The common solution is to eliminate the big numbers by restarting your character and scene at regular frequencies.
For a more indepth discussion check out the Unite video from the Kerball guys. They deal with a physics enabled spaceship across interplanetary distances. Some of their tricks are quite clever.
If you mean often, i get it. It makes me think about fixed time, or regular frequencies instead of space distance.
Space I 'm using is 5000 Unity units , is there a better distance?
There reason why I put it in game design and not in code, is also because I’m looking for a more open metaphysical ideas or solution. I do not believe that in reality the world moves all for me, resetting my space. It looks like all the world moves around us but in a fix way. In general what works in reality, can fit better in game (obvious is not a constant and fixing power problem is needed). There may be a solution, something less obvious but simple. Resizing what is farther away or for example flipping the world " x,y *-1 ". And at the same time moving the world! uuufff. Or moving the decimal floating point. Did you try in your game to move all objects in one frame? I do not even try.
I’ll admit, I don’t get most of what you’re saying. Sounds like late-night metaphysical fluff to me, but perhaps that’s because I’ve just gotten up and not had breakfast yet.
However, as to moving all the objects in one frame: sure, why not? Assuming they’re all under one GameObject (“World” or whatever you want to call it), you only have to adjust the position of that one object, and all its children are efficiently moved along with it. (Because Unity only keeps track of local positions, computing global positions on the fly as needed.)
Yes, I will make an experiment moving as you say. I will multiplying by -1 the player to go to the opposite side of the map. And *-10000 the “World” to move all the scene Game Objects. Or what is feasible as similar solution
OK, I see that you’re new — welcome to the Unity community! We’re a friendly bunch, but here are some tips to make the most of it:
Start your own threads; don’t hijack somebody else’s.
Start 'em in the right forum. That’s likely to be the “Getting Started” forum for a while. Definitely not the Game Design forum. (This thread shouldn’t really be in Game Design either, but… oh well.)
Ask actual questions. Not statements that you don’t know something. Unless, of course, somebody asked whether you know something, and you’re just answering them!
Be sure your questions include a description of what you’ve tried so far, what you’re thinking about trying next, and what obstacles are preventing you from trying it.
Capitalize the first letter of each sentence, as well as the word “I” (always), and give the punctuation keys on your keyboard a little exercise at the appropriate times. Yes, it matters.
And be of good cheer, because you’re embarking on a very rewarding journey. Follow these guidelines and you’ll be sure to get plenty of help on the way!