Walking on the surface of a sphere

Hello, I’m new to UE4, I’m trying to make a simple space simulation game, that the player can walk on the surface of planets. I could rotate and set velocity so that the player stick to the planet and rotate his down vector to face it, but I have no idea how to modify the part where it processes user’s input to move the character and play corresponding animation. Walking on a sphere, is it possible, or is it supported, or will it be supported in the future?

This is what I have so far:

Thank you for reading, any help is much appreciated!

I’m pretty sure UE4 only uses ‘down’ for gravity so you would be better off rotating the sphere as opposed to actually moving the character. In other words when he moves forward the sphere rotates backwards and he stays in the samw spot.

Rotating the universe could involve a lot of other problems. There are a variaty of sugested solutions for this, both in the forum as well as on the Answer hub.
One would be to deactivate the default gravity, and rather apply a force to the player character towards the center of your planetoid. You could use the inverted force direction to get the “up” vector for the model and rotate it properly so the head is facing away from the planetoid. Some of this would require deeper insight into blueprints then i currently got, and I am not sure if this is going to “behave”. But it could be a good test.

I was going to say this same thing. If you try to rotate the planet, it will get messy (not to mention it wont work if you decide to add multiplayer).

You can get a directional vector by using the player’s location and the location of the planet (which would be the center, I’d assume).

Edit: Also, I would set the player’s rotation when you process the player’s input. The rotation wont change unless the player moves so processing it on an event tick is some extra overhead you can avoid. But that’s just me being nitpicky

Using an arbitrary up direction for the character is on the Roadmap, but it’s currently listed as “Wishlist/Backlog”. Your only option right now is to modify the existing C++ character class, or make your own character controller from scratch (and lose all the existing features). If you have a very physics-centric space game, you could use a simple rigidbody-based character controller in Blueprint and set up your own custom gravity, jet pack propulsion, etc. You could probably start from the sample with the flying UFO rather than one of the character-based samples.

There is an “Adventure Kit” someone is working on in the forums that includes an arbitrary up direction, but there is no ETA for that either as far as I know.

Thank you for your replies! I’m sorry I’ve been super busy lately, so I didn’t check the forum, weird I see no mail notification setting. (Nvm I see it now)

I think I’m gonna wait for the Gravity Vector thingy to be supported then continue on developing my game. It says “October”, not “Wishlist/Backlog” any more I think. Does that mean we are going to see it implemented very soon? October is almost over.

EDIT 1: Oooow new update! 1GB update! Hopefully the gravity vector is included!

EDIT 2: Nope, it is not :C.