Is getforwardvector equivalent to rotator.vector?

Hi brothers :earth_africa:
GetWorld()->GetFirstPlayerController()->GetPlayerViewPoint( OUT PlayerViewPointLocation, OUT PlayerViewPointRoation );

If I am using PlayerViewPointLocation.getForwardVector () to get the direction; Is this equivalent to use PlayerViewPointRoation.Vector () ?

That doesn’t exist. If you mean GetActorForwardVector, then no. You can log out the values to test this.

Ok @DanM what is the difference between ForwardVector as direction and Frotator.Vector() as direction so?

You’re getting these from two different sources. They could be the same but I would suspect for most cases they are different.

PlayerViewPoint is going to be whatever the player is seeing.
GetActorForward is going to be the direction the actor is facing.

And you would definitely get something different with a third person character.

3 Likes

Privacy & Terms