Camera Get Rotation or Vector question. (I want to mirror object from Camera view) Interesting/odd math programing problem

I want to “mirror” an Actor.
For example, I start with the Quinn character.

By pressing Spacebar, she completely mirrors. Now she is facing the camera. Notice how the silhouette is exactly the same.

The character did not turn, if she did, her right leg would remain being back and that is not the case.

Here is how I mirrored the character with Blueprints.

“Perfect” mirroring like this only works if the camera is right behind the character.

I can change the blueprint for X to be scaled.

With this if I move the third person camera as close as possible to the side of Quinn, I get an X “perfect” mirroring.

For Z the same applies, and the character mirrors upside-down if the camera is perfectly above Quinn.

Now, my question is:
How can I get this mirroring effect on the character from any camera view?
The goal is to mirror and the silhouette of the character remains exactly the same, only left turns right, up turns down and front turns back.

Hope this puzzle intrigues you.
Looking forward to read your comments.

D.

Hi dmtzcaln,

You should be able to do the same thing in the Animation Graph - instead of doing the *-1 to the world scale, multiply the bone position results by -1 just before the end of the graph. You may need to invert the UV positions for the materials too…

1 Like

Interesting.
How would the Animation Graph take the camera position into account?

If I multiply the root bone position by -1, then the entire mesh is upside-down, but the silhouette is completely different even if looking from the top.

1 Like

That’ll only ever work if you’re looking directly perpendicular from the axis that you’re flipping no matter how/what you transform surely? This IS an intriguing puzzle! :slight_smile:

Rotating the verticies/normals to mirror depending on any camera angle isn’t something straight forward but it doesn’t sound impossible…

I was thinking exactly the same thing. From any other camera perspective, just flipping the axis would not work. Indeed there is a silhouette mirroring possibility; it just would need to be achieved some other way than * scale by -1.

It was a fun question. Thanks for your input!

1 Like