Tutorial: Custom Gravity in UE 5.4

@Tuafo Yeah you need to get a reference to the planet actor at runtime.

There are many ways to go around it, an easy one would be to just place your character in the level, set the Planet reference there, and make sure to have the player auto-posses the character:


image

Then you would not be using the Player Start, you could delete that.

Another way would be to get a reference to the Planet actor in the Character’s BeginPlay function. Like this (but add checks and stuff):

Third way would be to make the variable a soft object reference, then you can set it in the Class Defaults using the eye-drop button:



image