W
W
weblucker2018-09-16 05:44:18
Game development
weblucker, 2018-09-16 05:44:18

Unity2d - how to make a round game world?

Kind!
So, there is an idea, but troubles arose with the embodiment, deep Yandex did not really help.
The bottom line is how to implement a round game world in Unity2d (a planet, you can move around under the surface).
An example is Reus., but as far as I understand, there is procedural generation from round terrains - and I need a completely "manual" study of the world. The game itself is closer to the platformer genre.
If it’s just trite to create a circle and rotate the game camera around its center, then, as far as I understand, it will not be very fun to arrange game objects in a circle, and if the planet is large enough, then there is no certainty that there will not be too much load on the percent.
In addition, it is probably possible to rotate the planet itself in the direction of the player's movement - then you can use the native "gravity" of the unit for the character, and not rewrite gravity to the center of the planet.
Also, since it is understood that you need the ability to use the "floating" blocks classic for platformers, the question arises that in a round world the blocks should be circle sectors, which is absolutely tinny. There was an idea to embody the illusion of a round planet with the help of camera distortions - but something this approach raises doubts)
What are your thoughts? Thank you.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
Nikolai Trifonov, 2018-09-17
@weblucker

Google 1 : unity 2d circular planet gravity
Google 2 : Unity 2d Point Effector
Unity Tutorial: Faux Gravity (walk on planets) - a bit outdated tutorial, but the general principle can be understood (probably)

G
Griboks, 2018-09-16
@Griboks

Make a flat map. If you need a second run around the planet, teleport the player to the beginning of the map.

D
Dmitry, 2018-09-16
@demon416nds

but why?
if distortions are visible, then the diameter and, accordingly, the perimeter of your planet are small and, accordingly, the level will be short.
well, with a small planet, the distortions will not only be visual
, the gravity vector will change quite quickly, for which the players are unlikely to thank you

S
Stanislav Silin, 2018-09-16
@byme

As a variant of hex sphere . And to make gravity to the center is relatively simple. We take the rigibody, normalize its position, multiply by -g (the minus is needed to turn the vector inward), add it as an impulse and repeat for all the other rigibody.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question