I’m currently working on a VR flight simulator type game, but my issue is when I move the blueprint actor (Yoke) to get it’s roll/pitch/yaw to rotate the vrpawn, it gives me 0.0 values and Accessed None error when I try to refer to those values in my Vrpawn. See error below.
When L is pressed, it is giving me 0.0, 0.0, 0.0 values for all three Roll/Pitch/Yaw float variables, even though these variables seem to be set and saved correctly in BP_Yoke blueprint. Why is it not updating for my vrpawn?
That is where you declared the variable type, but you aren’t actually setting the variable to reference an object instance. You need to drag the variable into the blueprint graph and “Set” it to an existing object instance so that the variable references that object instance. In other words, after you spawn the BP Yoke actor, you would set the variable to the spawned BP Yoke actor.
I tried setting it in vrpawn and it still didn’t work. I found a tutorial where I just used a custom event to get the actors ( BP Yoke ) and set the copy to BP Yoke ref. ( see below )
Keep in mind this will work in this case because you only have 1 instance, but as soon as there are multiple instances this will not guarantee you get the right one. If you are placing an actor in the world directly, and not explicitly spawning it from inside a blueprint, you would need to get the instance from the level itself. Just for future reference.