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"

How to check if a key is Up/Down?

 float result = InputComponent->GetAxisKeyValue(EKeys::A);
 if ( result){        
 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, TEXT("This is an on screen message!"));
 }

What am I doing wrong? I tried many keys, none worked.

Product Version: Not Selected
Tags:
more ▼

asked Apr 27 '14 at 05:56 PM in C++ Programming

avatar image

noatom
252 17 35 149

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

1 answer: sort voted first

Axis keys are "keys" such as the sticks on the gamepad and you can get the current axis value for them as seen by that particular InputComponent.using GetAxisKeyValue.

The input component doesn't actually track whether it thinks a given key is down or not. Your best option is PlayerController->IsInputKeyDown(EKeys::A) which looks at the global state of whether that physical key is currently down (as far as the PlayerInput is concerned, if you were to press it while the application didn't have focus and then alt-tab it would most likely report as false).

more ▼

answered Apr 27 '14 at 06:25 PM

avatar image

Marc Audy STAFF
2.2k 42 35 95

(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