I’m trying to modify the spring arm component for my Camera.
What Im trying to do is have a front trace so that if the character draws near to a wall, the camera will get closer behind him…
So I have a FrontResultLoc that I obtained via a trace in front of the character. and now I want to rotate this vector around the character 180deg, so i would like to do this in local space.
But I cant find how to do it…
In UDK i would just do something like MyVector << Pawn.Location and then rotate it, but there isn’t this kinda macro anymore in UE4
I see a lot of people talking a Matrices, but I dont see how they can help.
Rotation around the character 180 deg is very specific rotation. I propose to you next way:
You know character location (or point you want to rotate around) and character forward direction. With this info you can describe plane and mirror point.
Sorry I didnt anwser before but I managed to resolve my problem.
For those interested here it goes:
First, I had to bring the location of the camera in the characters local space, for this i substracted the characters position form the trace result. Since Im using a Spring component to achieve what Im doing, for me it looks like this: