Hi everyone.
I begin to follow a tutorial for create a 3/4 camera but I have a problem, and I don’t know why. When I launch the game on UE4 and I try move the camera nothing happens, and when I stop the simulation he says “Accessed None Trying to read Property CameraPawnRef” from node SetActorTransform.
It means you never set what your Camera Pawn Ref is. Somewhere in begin play make sure you set what the CameraPawnRef actually is, because right now it is set to nothing, meaning it has no idea what to work with.
Also turn your ‘Movement Speed Calculation’ function to a pure function, or connect the white wire. Without either of these two steps, you will always get a 0 as your Axis Value.
I just saw that my first post work, when I try to post I was an error.
For this error, I find why I was that, that was an error on project setting. But I will try your solution cause for the moment nothing move.
I am having this problem as well. I’m pretty sure I followed the tutorial, and people keep talking about GameMode/GameState. I’ve switched those options in every combination possible, but nothing’s working. I just don’t understand what’s going on.
Edit: Never mind, I apparently had crossed some wires, and other wires had fallen out.
I don’t know yet why this helps because in the output log after attaching Prints everything logs in correct order.
So to get rid of the errors I’ve added bool variable IsGameInitialized which Set node is executed after Setting CameraPawnRef in BeginPlay, and then added for input nodes additional Branch node for them to execute only when variable IsGameInitialized is true (which runs before any other input and scrolling logic).
I don’t know but maybe that input nodes are enabled just at the start of begin play and runs on the other thread and actualy could run before BeginPlay executes the Set CameraPawnRef. Thats one possibility.
Anyway adding this varianle and checking it before inputs nodes are processed got rid of the “Accessed None trying to read property CameraPawnRef” error
I was following this tutorial RTS Tutorial Camera Movement - Unreal Engine 4 - YouTube . And it works in the editor but there are errors visible in output and message log, so the built game cannot be played as package until those errors are solved.
But game still breaks inside Tick event on the graph because reference is not set. Im setting references in the Sequence node in the BeginPlay event. Tonight I will try to post clean example of this error maybe on github or something, because I’ve made some changes after my workaround.