Why isn't VInterpTo(AActor->GetForwardVector()) moving forward?
I'm trying to write a function that will VInterpTo() every tick to move the player an arbitrary distance in a given direction, in this case in the direction he's facing:
This compiles fine, but the movement it creates is seemingly random: movement direction is independent of the character's facing, and seems to either push him away in a random direction, or suck him towards the world origin. The most obvious explanation in my mind is that the vector math is wrong, and endLocation doesn't point to a position n units in front of the character like I think it does, but I'm really lost when it comes to how to fix it.
asked Jul 14 '15 at 03:07 PM in C++ Programming
I am guessing that you need to add startLocation to your current endLocation, as your endLocation will always be around 0 since GetActorForwardVector is a unit vector pointing forward, not a position in space in front of your character. He's probably always moving to a location kind of by (0,0,0).
Edit: Like this.
Follow this question
Once you sign in you will be able to subscribe for any updates here