x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.17
Tags:
more ▼

asked Oct 22 '17 at 10:03 PM in C++ Programming

avatar image

Thumper
966 139 149 388

avatar image neelix32 Oct 22 '17 at 10:44 PM

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?

avatar image Thumper Oct 22 '17 at 10:54 PM

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...

avatar image neelix32 Oct 22 '17 at 11:23 PM

Try adding Spawn Default Controller after you call SpawnActor.

avatar image Thumper Oct 22 '17 at 11:36 PM

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...

avatar image neelix32 Oct 22 '17 at 11:44 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

That worked, thanks!

more ▼

answered Oct 22 '17 at 11:35 PM

avatar image

Thumper
966 139 149 388

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question