Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

We simulate the next ~100 positions and velocities of the rocket whenever something changes, using basic physics equations (like dv = accel * dt and dp = dv * dt) the tricky part was making sure everything aligns with unity's physics, as we use that for the final result. We also account for the estimated mass of asteroids, which affects the red and blue trajectory lines, as well as checking if any predicted position collides with a planet (easy as all the planets are circles). Then, we use Unity's Line Renderer to visualize these trajectories.

woooow okok very very smart !