Help please, character is not falling

This is lame but I can’t figure out what happened. My character has stopped falling when the game starts. I’ve checked if the gravity is enabled on the capsule. I’ve checked that gravity scale is 1.0 on the movement component. I’ve checked that global gravity is -980 and that this is set in the world settings and override is enabled to ensure this is the value being used.

I’ve tried creating a new character BP, slap a mesh on it. Verify all the settings are good (they are by default). When the character spawns they just float in air. What happened?

1 Like

I can move the character between animations. Technically the character that won’t fall is not the one in my game mode, instead my game mode references a special ghost character class I built that manipulates other characters on the ground. This is the class where the character that won’t fall is spawned from. In the constructor of the game mode character I store a reference to the Character_BP of the ground character that won’t fall. Then I spawn it upon a button press within the ghost character class for testing - it uses SpawnActor in code. I can see the character spawn up in the air, but it does not fall. To make things more confusing if instead I take that Character_BP and drag and drop it into the scene via the editor, place it up high, and then press play it will fall. So dropped into scene == falls, spawned via code == doesn’t. This is the exact same BP just different spawning methods…

1 Like

Is it completely frozen or can you move in the air? It sounds like an issue with the GameMode, can you check whether the pawn you’re possessing is really the character you want to control?

Try adding Spawn Default Controller after you call SpawnActor.

You could try adding it on BeginPlay on the character, but I haven’t tested it, it might not work as expected.

That worked, thanks!

Any idea how I can set this up without having to call it after a spawn? Seems like this should be a setting in the character or game mode…

go ahead and open up class defaults on your character / actor, and changed “Auto Possess Ai” on the “pawn” section to “placed in world or spawned” or “spawned”. that should fixes everything.