Get Forward Vector for Attached Actor Not Working (for me)

Hi all,

I am wondering if anyone has a moment to tell me what I am doing wrong here? I’m still fairly new to UE, so it could be a simple fix - I’m not sure. Any help would be greatly appreciated because I have now spent a whole day trying to figure this out :stuck_out_tongue:

I have a vehicle blueprint and a virtual camera blueprint. I need to be able to attach the virtual camera to the vehicle, so that when the vehicle moves/rotates around the level, the virtual camera goes with it and can then be rotated/changed location, relative to the vehicle. I have managed to get the linking to work, however no matter what settings I have tried, once I trigger the link, I cannot get the virtual camera to move in a consistent direction. It starts moving to the right (when I am trying to tell it to move forward, relative to the camera view. When I spin the vehicle 180 degrees, it does the opposite).

Anyone know a way to set this up that would work? Thanks in advance!

Screenshots below –

Wild guess, have you tried different location/rotation rules? Maybe keeping the relative loc/rot is giving unsual behaviors.
Have you checked the facing direction of your virtual camera? Is your virtual camera a child of the scene component?

Are you able to string the values of the location in from your Finterp?

Hey there,

Thanks for the quick response!

To answer your questions:

I believe I have tried every combination of those options settings. Nothing has worked so far.

I ran a print string of the forward vector value for both the vehicle and the camera. Here are the results. Camera is in RED.

Correct, the virtual camera is a the child of the scene component.

Print string values are between 0-1 for the FInterp. Is that what you mean? That’s from taking the return float value out of the FInterp and piping it into a print string.

Side note – If you have any idea why there is so much pixelation around the front wheels, I’m all ears. Thats the next thing I need to figure out hehe.

I’m not an expert with vehicles, someone smarter might know what’s going on, but I can take a look into the problem if you send me the project.

Hey Conrad,

Thanks very much for the offer! I’ve actually just switched the controls over to absolute world axis and it’s at least consistent now (relative to the vehicle at least). Not ideal, but it will probably work for what I need. If anyone else is having issues with this though, it definitely seems that the attach to actor node is clashing the forward vector results.

So attach to component is working better? Would you mind posting the solution for others encountering a similar problem?

Hi Conrad,

Not exactly working properly, but I found a workable solution for my needs. I removed the ‘get forward vector’ for when the camera BP is attached, so I can move forward/back and let/right, relative to the vehicle. Not perfect, but it’s at least consistent.

Screenshots below:

Very cool. If it works it works. Interesting solution.