4.11 resets Camera Components to location "0,0,0" if used as viewport preview

I just updated my project to 4.11.

I’ve noticed right away that any moment in the game that uses a scripted camera now doesn’t work as before. All Camera components inside of Blueprint actors are now always stuck at the location 0,0,0 relative to the blueprint instance in the map.

If I try to manually change the camera component’s location either inside its Blueprint or in the map instance, the location values just change back to 0 in the map’s actor instance as soon as I press enter. The strange thing is, the Location looks correct inside the Blueprint editor. The Camera component inside the Blueprint editor is still where it’s supposed to be. It’s only in the map instance of that Blueprint that the location ALWAYS defaults to 0,0,0.

As a test, I tried re-creating the camera inside of one of my blueprints, to see if recreating it would get rid of this glitch. It didn’t, the new camera also experiences the same issue. I also deleted the instance of the Blueprint that was already placed in the map, and I placed a new one of the same class. The new one experienced the same issue.

Just noticed that the problem actually only occurs to the Camera Component that happens to be in use as a preview in the UE4 viewport (the little box that appears on the lower right corner when the Blueprint is selected). Any camera components that are not in use for this remain in the location they are supposed to be (instead of being reset to 0,0,0)

A temporary workaround for this problem; Duplicate the original camera component and replace every Blueprint script reference to the original camera with the new copy, while leaving the original camera component in tact (don’t delete it). The viewport will continue reseting the original camera to 0,0,0 but the Blueprint code will use the new one.

Hello pvalencia,

Does this happen with brand new Blueprints that have a new Camera Component added to them? Also, have you tried reproducing this in a new project that wasn’t converted from 4.10?

The reason I ask is because I tried reproducing this without seeing this behavior. I created a new Blueprint, opened the Blueprint Editor, added a Camera Component, and then moved the Camera Component via the transform widget in the Viewport of the Blueprint Editor. After this, I placed an instance of the Blueprint in the level and the Camera appeared in the correct place in relation to the Blueprint’s root. The Camera was being used as the preview when I selected it as well.

I just created a brand new project with 4.11, and the problem did not occur. It appears that the 4.10 → 4.11 conversion process has glitched my existing project somehow.

I think I will just migrate everything in my project to a new one, which should fix the issue for good. Thank you for your help !

EDIT: I just finished the project migrating. I can confirm the problem is gone! I’ll definitely use the Migrate feature again next time there’s a major engine update, to prevent issues like this from happening again.

I had this strange issue as well, but I think the conversion process has you confused, I think it is not related.

The easiest way to explain I guess, is that if I have no Sphere placed at 0.0.0 in my BP, then the camera in that resets to 0.0.0 when the BP is spawned - even if it should be offset.

But placing a sphere at 0.0.0 in the root makes the camera offset as it should.

I hope that somewhat cryptic explanation gives the next poor soul searching a clue on how to work with this issue :slight_smile: I just spend a stupid hour on this crap :stuck_out_tongue: