I am trying to use the Tick Event in my character blueprint to change the FOV when my player is sprinting, but it isn’t working. I put a breakpoint on the tick even and on my event to change the FOV, and nothing. I am posting a screenshot of my BP below (right now, I have the branch disconnected to test it for sure. I know the change FOV action works because I tried it with a begin play event, and it worked fine. Let me know if anything is confusing.
For the “Tick” to work you need to plug in the EventTick into the Branch. The way things read in BP will read the in order it goes through the white arrow points. When it’s getting to the “Set” on top it’s not going anywhere beyond that. If you want it to use the Branch you need to plug it into that and then based on the true or false condition it will choose which Set to use. As it is now. It looks like the event tick will default to the field of view you have in the set it goings to.
I don’t think you understood my phrasing above. I have it purposefully disconnected in order to see if the actual Tick event wasn’t firing. Right now, the way it is set up in the BP, the FOV should be changed to the smaller FOV every frame, but the FOV never changes from the default. I tested the set FOV node by plugging it into the begin play event, and that worked, but when plugged into the Tick Event, the set FOV node never fires even when directly attached.
In C++ you can set PrimaryActorTick.bCanEverTick = true; in the constructor. Perhaps you can do something similar in BP as well if you are using BP only solution.
Really you wouldn’t want to use event tick as that is rendered every frame. For what you have you may want it to only change field of view when a button is pressed. There is input pressed check for that since you’re looking for it to see if you are sprinting.
Wait, but I forgot the reason I wanted to ask this question: why is my Tick event not ever firing when it should fire every tick?
The reason I ask this is because I do have several effects that need to be applied every tick, and since this is just my character, I am not worried about the performance implications for one object.
If you connect the Event Tick execution through a Print String before it reaches the Set FOV, does it print? When you use the debug mode, how far does the execution get? Does the execution line activate at all? Any additional information may help.
When I hook up the print string, nothing gets printed. When I put breakpoints on nodes, they never get hit, which means the execution path is not getting activated at all.
For the record feature there is a bit of work involved. you need to access the UE4Editor.exe file by going to /UnrealEngine/4.1/binaries/win64. When you find the .exe, right click it and create a shortcut. Then right click the shortcut and go to properties. In the target line after the quotation marks, put a space then type -forceenablecrashtracker. Now, click OK and double click the shortcut to open the editor (note: the launcher will open as well, ignore it and go directly to the editor). Open the project and in the top right corner of the editor will be a small red circle. This is the record button. If you press this it will record the last 20 seconds of your screen and save this into your project saved folder.
On top of this, can you reproduce this in a clean project with a new blueprint? Thank you!
Did you ensure that in both the project settings and the world settings you have your character set up as the default character? If not it will call the original character script instead.