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"

Input not propagated to InputComponent in packaged game

Hi. I have a problem. My input is not working when I package the game. It works in Editor and when I run in standalone game. But when I package it the input doesnt work. At first I thought that it's problem with focus but it's not... console and alt+f4 were working. Then I added a PrintString into the Level Blueprint to check if the axis mapping was packaged... and it seems that worked...

I also wondered if the possession of player controller failed but that also works... (I think because the AI is trying to kill me and AI is finding the player using GetPlayerController->Get Controller Pawn... So it seems that the input is not propagated into the Actor or just into the UInputComponent... My custom Pawn has a custom UInputComponent (UPlayerInputComponent)... where I have setup all the inputs. I think that should be correct... also I checked that I call the SUPER everywhere... :

 UPlayerInputComponent::UPlayerInputComponent(const FObjectInitializer & ObjectInitializer) :
     UInputComponent(ObjectInitializer)
 {
     PrimaryComponentTick.bCanEverTick = true;
     PrimaryComponentTick.bStartWithTickEnabled = true;
 
     BindAxis("Forward", this, &UPlayerInputComponent::MoveForward);
     BindAxis("Right", this, &UPlayerInputComponent::TurnRight);
     BindAxis("CannonRotate", this, &UPlayerInputComponent::CannonRotate);
     BindAxis("Fire", this, &UPlayerInputComponent::Fire);
 }

I have a PlayerTank and AITank... they derive from my Tank pawn and I just added to PlayerTank the PlayerInputComponent into the tree

EDIT1 : Also by debugging I figured out that I cannot see the PlayerInputComponent I created in the list of components that the pawn owns... it's weird because the constructor was called... As I said I added a component in the overriden blueprint

Product Version: UE 4.18
Tags:
more ▼

asked Jan 21 '18 at 08:20 PM in Packaging & Deployment

avatar image

martinkosicky89
12 2 2 6

(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