# How can I find the opposite angle and position of the camera?

In this project I have a character and a camera that follows it.

The camera has a position relative to the character that was defined as (x = 0, y = 0, z = 0) and also its rotation:

I found a value close to its position and opposite angulation, but not really the correct value:

By pressing the Q key, the camera shifts to the position and angulation that I have discovered. Releasing the Q key, the camera returns to its initial position:

IN GAME:

As you can see, the inversion is not 100% correct.

One of the ways I thought, is a way where I take this relative value from the camera (x = 0, y = 0, z = 0) and with that:

I put the character's mesh at the location (x = 0, y = 0, z = 0) at the level and so, as the camera will be (for example) x = -250, y = 0, z = 300, it's just I invert the value of x. The angulation is simpler to deduce, but it would be interesting for me to also derive its relative value (0, 0, 0).

EDIT 1 (Attempt that I did and that almost worked out)

By clicking the down arrow to the left of the values, you can select whether you want the variable to be Relative or World (I did not know that):

Before it was all 0, it now has a value:

Taking the minus sign, I was able to figure out the opposite position:

New position:

It happens that at the time of changing the angulation from relative to absolute, a conversion is not made:

I can not get absolute value equivalent to relative. What happens is that the value 0, 0, 0 is also defined for the absolute rotation. In the image below the camera was exactly in the same position as the VR camera:

I discovered by trial and error the equivalent angulation between relative and absolute:

BLUEPRINT:

The code works correctly, but I feel that again I did not get exactly the position and opposite angles.

Here are some screenshots of the game:

Local X with NORMAL CAMERA:

Local X with OPPOSITE CAMERA:

Local Y with NORMAL CAMERA:

Local Y with OPPOSITE CAMERA:

Note that in the opposite camera you can see the end of the world (sky) from wherever you are, which is not the case with the normal camera. I noticed this, and so, I think once again I did something wrong.

• What was wrong with the relative value approach? – Alex F May 12 '19 at 0:36
• With this value of 0, 0, 0 I have no idea of ​​the real distance between the camera and the character. Putting this value as absolute I will be able to define its location and opposite angulation. – Boneco Sinforoso May 12 '19 at 0:40
• If you know the camera's absolute position, and the character's absolute position, then you know the camera's position relative to the character; just subtract. – Alex F May 12 '19 at 0:56
• Apparently I managed to figure out the position, but again I get bogged down with the angles. I edited the question. Take a look. – Boneco Sinforoso May 13 '19 at 22:48
• Since the camera is attached to the spring arm, you're changing the position relative to that, not the character. If the spring arm positions don't change, this shouldn't affect the camera but there is a chance it will. – Stephen May 14 '19 at 11:29

To get the correct result, I had to make the Spring Arm simpler/understandable.

Initial Spring Arm:

Modified Spring Arm:

I set the location and angulation of the normal camera:

I recommend setting all values ​​of rotation to 0 after finding the inverse position of the camera:

I recommend furthermore only modify the values ​​by the details tab. Do not use the E shortcut and set the rotation with the mouse (errors happened to me):

Then just find the reverse rotation in the necessary axes:

• X axis, for the camera does not stand upside down.

• Y axis, in this case is the inverse angulation at 45º.

Superimposed normal and inverse camera images:

See that the character remains in the same place in the two images, so the location and angulation were defined correctly.