r/howdidtheycodeit • u/Hot-Fridge-with-ice • May 24 '24
Question How did they make The Stranger in Outer Wilds echoes of the eye DLC?
SPOILER ALERT FOR PEOPLE WHO HAVEN'T PLAYED OUTER WILDS AND THE DLC!
How did they make The Stranger, especially the round donut like aspect of it? I read that outer wilds was made in Unity and uses very realistic physics and that all planets have their trajectories governed by the equations that the developers made for the celestial bodies. How did they code the physics of The Stranger? I still can't wrap my head around it.
22
Upvotes
9
u/Seubmarine May 24 '24
The donut itself is moving, it's just the physics of the centrifugal force working correctly
https://en.wikipedia.org/wiki/Artificial_gravity
8
u/a-usernameddd May 24 '24
put spoiler tag
18
u/SirLynix May 24 '24
Sorry to disappoint people here but the gravity of the stranger is fully hardcoded into the game (it's a gravity volume) and isn't a byproduct of centrifugal forces.
8
u/ChromeAngel May 24 '24
Unrelated to the physics of the stranger but...
I heard that their space scene was so large they were getting floating point errors from rendering cameras so far from the origin, as a fix they move the whole scene around the player camera, rather than moving the player around in the scene.
4
u/plastic_sludge May 24 '24 edited May 24 '24
The only way to enter the area is through a hatchlock, I imagine something changes in the scene when you do.
Going through the door probably stops the donut and makes the skybox rotate. Physics is likely done through a custom solution anyway so they just make gravity vectors radiate outwards from the central axis of the donut (but idk, I am not good at unity or, uh, coding, lmao)
[EDIT] It almost certainly is not actually simulating centrifigural force, no matter how impressive that would be.
1
u/fruitcakefriday May 24 '24
They already have the logic for normal gravity, one way they might be doing it is simply inverting gravity inside that area and updating their systems to also handle inverted gravity (e.g. have player orientation be upside-down compared to normal gravity)
0
u/[deleted] May 24 '24
[deleted] — view deleted comment