Hi there everybody. So I was working in my blueprint for an enemy space fighter and trying to get it to track my position, face my position, and shoot me. After many hours, I still could not get the bullets to fly straight at me. Then, I started noticing some very worrying trends:
- No variables were watchable because none were “in scope”
I was trying to debug things like my player’s location vector and my fighter’s location vector, as well as many other values that should be accessible to my fighter’s blueprint, but all were listed as “variable not in scope”:
In case you’re not sure what you’re looking at, those are the location vectors of a static mesh component “fighter” which is a part of this blueprint, and of a variable of type target point that I repeatedly assign as part of my AI. For some reason, neither of these things are in scope. Fortunately, they still function as intended, but then, I did port these over from 4.6, so maybe that’s a thing.
Now into the new territory, where the source of my problem is, and may be getting fuzzy. I was trying to edit some of the code for my fighter’s firing logic. As I did so, I realized that none of my vectors were coming out correctly in PIE.
I have tried every single method I could think of to get a vector to launch my projectile with force at the player (Look at rotation with a get xvector, the turn to face logic by subtracting the start and ending vectors from the Math example, etc.). Every single time, however, I was getting a similar result.
That really bright ball in the center is my projectile. On fire, it slowly dribbles along the nose cone in either the positive or the negative direction of the world x axis. Even when I tried using the forward vector, it would run along the x axis. Literally nothing works and it all produces this result. I do not understand the source of this problem, or whether it has something to do with the fact that nothing is in scope, but it seems to me to be a bug with pretty much all vector nodes that I have created and used while using 4.7. Is it a bug? or am I just missing something?