Actor forward vector not working properly
I'm creating a 2d fighting game and I'm stuck on why I'm getting different values from different blueprints for my actor's forward vector. When I print my actor's forward vector from the actual character blueprint event graph I get what is expected, which is a positive forward vector in the x (+1.0) when facing my opponent on the left side and negative forward vector when turning to face my opponent from the right side (-1.0). However, when trying to grab that same forward vector and print the results from my animation blueprint which is attached to my character blueprint, I only ever get a positive forward vector value in the x (+1.0) and never a negative value when I turn to face my opponent from behind him (on the right side of him). I don't know why I'm getting two different results for my forward vector every frame. Here is my Animation blueprint code:
Here is my 2d game with the output of the string shown on the left of the screen every frame. If you can't read it is says x is +1.0 which is correct as my character is facing forward in the positive x direction:
However, when I'm on the other side facing in the negative x direction, the animation blueprint still outputs a +1.0 forward vector which is not correct:
We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.
answered Aug 26 '16 at 01:08 PM
ImVawx ♦♦ STAFF
I was with the same problem. For some reason the forward vector is not get the correct direction of the x axis. So i did it by other way. I Was trying to get the forward vector of my FirePoint of my Barrel. I just put another Scene component at the Pivot:
So when the Turret Moves in the YAW Axis, all the child Scene Component of Barrel moves togheter and everthing is precisely telling me the start point (BarrelBase) and the end point (FirePoint) of my correct forward vector.
To generate the correctly Forward Vector just subtract BarrelBase from FirePoint. Just That.
I Try a lot of other solutions but only that solve my problem. If SomeOne has another Idea to solve it better, please it will be Welcome.
answered Jan 07 '18 at 07:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here