Having problems understanding FVector::Rotation()
So I have this code that makes my object "look" at the player.
What I don't understand is this line
And why does this work ? I dont understand how can you get the rotation just by substracting the locations...
FVector::Rotation() converts a direction Vector into a Rotator. selfLocation - playerLocation calculates the direction Vector from the player to self. After this the direction Vector will be converted to a Rotator. That means the VisibleComponent always looks to the Player if it gets this Rotation.
If you need further Information go to https://docs.unrealengine.com/latest/INT/API/Runtime/Core/Math/FVector/Rotation/index.html
Greetings Cloudy :)
answered Aug 31 '16 at 03:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here