# Is it possible to convert a vector to local vector ?

I’m not even sure if i’m asking this in the appropriate way but here is what i’m trying to do.
I’m controlling a camera with timelines like this:

Now let’s say the timeline is telling the camera to move up, if i rotate the camera 90° to the right the camera will still move up, not relative to it’s rotation of 90° which should be right.

Could anyone help me with this ? This is not the first time I encountered this problem but I never found a solution.

Anyone ? I still haven’t been able to make this work

it is all about how you place all actors in hierarchy of blueprint, they all are relative to each other.
So if one of actors there is rotated by 90 deg, everything placed on it will be rotated.
Same goes for scaling and offsets, that all can get messy.

Whatever i have troubles with vectors i add “trace line” and set drawing to one frame or duration, this way i can see vectors in 3d in game time.
it helps understand what is wrong with my vector math.
You can also add arrow components and make them visible during gameplay, and resize up 5 or so times.

Converting world location to local location is matter of substracting local root location from world location vector.
Also for rotations you can rotate rotator, to fix wrong rotations.
Or you can clean up your actor hierarchy in blueprint.

Ps. If you want faster or more precise replies, make your questions precise and clear, it is hard to guess what is problem you have with that blueprint (or even if its in blueprint)

How can you be rotating it with a location node?

If that camera Position is a vector in local space he can use: rotate vector along axis, and put axis as for eg. 0,0,1 rotation 90deg.
If its world location he needs to substract camera wolrd location wih its root (actor that camera is connected to) world rotation, then rotate, then add that root vector again.

But his question is kind of unprecised so i am not sure what real problem is here.

I’ll try to be more precise, the data coming out of timeline “camera position” is vector data.
In the following gif the camera is static:

In this one instead the camera is rotating:

What I want is the camera to always zoom like in gif 1 even if the camera is rotating

The rotation comes from another source, an “AddLocalRotation”