Skip to main content

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

To the guy that programmed the game. You mentioned that you calculated your own gravity. Did you do that by applying a LERP towards the center or by using Rigidbody.addforce()? I really liked this effect and was hoping to replicate in my own projects somehow.  I was the dude that was talking to Matt Woelke about pokemon lmao. 

The vibe of the game was really peaceful haha. The way you did the sun was really breathtaking. Probably my favourite moment was when you walked towards the horizon and it started to peek over. 

(+1)

Hey, that's me!

Yea it's an AddForce on every frame.

The player's rigidbody has the physics engine gravity turned off and rotations frozen so the physics doesn't mess with our character without our permission.

The math is super straight forward:

Get a normalized vector from planet to player (player pos - planet pos), and do the AddForce on the rigidbody using the gravity vector * -gravity force.

Then you just align the transform's up vector to the gravity vector and multiply in the planet's rotation to add the planet's rotation to it. (Though I never rotated the actual planet.)

 Done!