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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Add Input on Tick not working, why?

When I'm Adding Input - for example Add Pitch Input in Tick it isn't adding anything into the input, anyone know why?

When I do the same using event - for example "F" pressed the same thing is working.

Product Version: Not Selected
Tags:
more ▼

asked Jun 13 '14 at 10:58 AM in Blueprint Scripting

avatar image

intoxicat3
672 70 90 146

avatar image Steve Allison STAFF Jun 13 '14 at 03:52 PM

Hey intoxicat3,

Can you provide a screenshot of your blueprint setup?

-Steve

avatar image intoxicat3 Jun 13 '14 at 04:11 PM

Hi Steve, I'm away from editor but setup is really simple. In your PlayerController create a Tick and Add Pitch Input with some constant. It won't change pitch. (it should rotate all the time)

Add "F" input and plug in into the same Add Pitch Input - when you press F it the Add Pitch will work, and you will rotate with this constant.

Everything is in PlayerController. Doing this in Shooter Example BP clear project.

avatar image intoxicat3 Jun 14 '14 at 11:28 AM

Do this in PlayerController and open in Mobile Preview - you will see Print but without any look right/left input.

When you replace tick for "Mouse X" input for example it will work. alt text

tick.png (117.9 kB)
avatar image Charlemagne III Sep 21 '16 at 04:07 AM

Has anyone solved this issue? I am also unable to add input to a character on tick. It doesn't respond to it.

avatar image Thomas Ingham Sep 10 '14 at 04:25 PM

I'm dealing with this same problem right now.

avatar image rohoon Feb 13 '15 at 01:27 AM

I'm also having this issue. Can anyone shed some light on this? See attached image for a simple case in which Tick doesn't rotate the player, but an input event does.

alt text

turn_on_tick.png (71.2 kB)
avatar image MinxiesDev Aug 28 '15 at 02:05 PM

I'm also getting this issue in C++. It's very strange.

avatar image MinxiesDev Nov 10 '15 at 12:56 AM

Just spent another evening banging my head against this.

Epic, if it's still an issue, please say and save anyone else doing the same.

Thanks, Minxies

avatar image dingtech Apr 11 '16 at 01:25 AM

Still happening on 4.11 - Took a while to see that others were having this issue also.

avatar image Charlemagne III Sep 21 '16 at 04:07 AM

Has anyone solved this issue? I am also unable to add input to a character on tick. It doesn't respond to it.

avatar image _h2o_ Apr 20 '16 at 10:24 AM

yeah, 4.11 still the same issue in c++ in actor used same tickgroup as character

avatar image _h2o_ Apr 20 '16 at 05:24 PM

it is look like if you are trying to access input from other class in tick where no input component - then input is already processed and zeroed

avatar image _h2o_ Apr 20 '16 at 05:38 PM
avatar image _h2o_ Apr 20 '16 at 06:57 PM

i solved my issue with adding AddTickPrerequisiteActor, so my actor is ticking when input is pending and before all input processed and flushed

avatar image Charlemagne III Sep 21 '16 at 04:07 AM

What actor did you set as the prerequisite?

avatar image ThisGuy5234 Apr 20 '16 at 10:44 AM

We need a fix, too. bump

avatar image Daverkex Aug 02 '16 at 11:54 AM

4.12 have this bug, please registre the issue.

avatar image Charlemagne III Sep 21 '16 at 04:07 AM

Has anyone solved this issue? I am also unable to add input to a character on tick. It doesn't respond to it.

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

2 answers: sort voted first

This doesn't seem possible via the Tick at this time. If you need to do rotation via the Tick instead of via input events, use SetActorRotation (or SetControlRotation on the Controller) with an FRotator.

I'm not sure why UE4 Staff haven't given a specific answer as to why it doesn't work on the Tick after years of people complaining about the issue but I think it could possibly be that input data is being cleaned up at the beginning of each frame (before the tick) and then populated (as the input process happens before any game logic as you can see from the image below).

This is the input process from the Input docs: - InputFlow

more ▼

answered Dec 24 '16 at 10:15 AM

avatar image

Furinyx
214 7 11 24

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

Guys this bug still happens in the 4.16.2. After digging in the engine source code I found out that the RotationInput variable (Used by AddYawInput/AddPitchInput/AddRowInput and alike to store the rotation) was getting cleared after calling the Tick function. So calling these functions inside tick won't work at all.

The workaround is to call AddPitchInput before or after the PlayersController's EventTick function.

Here's what I have done:

  1. Create a component called "TickPrerequisiteComponent"

  2. Add a single EventDispatcher to this component called "OverrideEventTick" function must be called by "TickPrerequisiteComponent" every frame on the EventTick alt text

  3. After that is only a matter to bind some function to it

  4. You can also make sure the component Tick order by using the function AddTickPrerequisiteComponent. I guess this step is not necessary. alt text

more ▼

answered Jul 28 '17 at 05:09 AM

avatar image

lassade
3 2 4

(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