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"

Unbound Movement Axis When Switching Player Pawn

I am implementing a system where the Player Controller swaps its controlled pawn between two Characters. I am accomplishing this using Possess and Unpossess logic inside the Player Controller, but after the transfer is complete the second character does not receive any input from the MoveForward and MoveRight axes. The other axes which rely on mouse input work fine (ex: Look, Turn), but these two are using the WASD keyboard keys are never activated. Other inputs which use keyboard keys (ex: C, M, Space Bar) and are bound as action mappings function properly; it's only the WASD input axes that never trigger their callbacks.

I have traced the problem into the PlayerInput class where all of the axis bindings are looped through to accumulate their values. A check is performed on if(AB.AxisDelegates.IsBound()), and the MoveForward and MoveRight axes fail this check. However, this is after they were added to the InputComponent in the Character's SetupPlayerInputComponent method. There are no other pawns or characters which are fighting for control of these axes (as far as I know), so I'm really not sure why they are coming back as unbound to the character. Would they somehow still have a reference to the original character, even though all of the other axes transfer successfully? Is there a way to discover what is consuming the input, if it isn't the Player Controller? The controller itself and its input settings are not changing, only the character it is controlling is being modified, so the input priority stack shouldn't be affected.

Additionally and strangely, if I setup input axis events for MoveForward and MoveRight in the character's blueprint, these do receive input and work correctly, so that at least proves that the pawn is enabled for receiving the axis input to some degree. Any idea why those methods and binding are failing in the code?

Product Version: Not Selected
Tags:
more ▼

asked Feb 26 '15 at 05:25 PM in Using UE4

avatar image

jweinhoffer
0

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

0 answers: sort voted first
Be the first one to answer this question
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