0
\$\begingroup\$

How can I switch cameras from First Person to Third person or from thrid person to first person. Like at GTA V you can switch the cameras. How to do this?

Tnx for your time.

\$\endgroup\$
2
\$\begingroup\$

Simple method: Add two cameras to your scene, the first-person camera and the third-person camera. Attach both to the player-character. Move one on eye-height, the other further behind. Deactivate one of them. To switch between them, deactivate one and activate the other. This results in an immediate switch between the two perspectives.

Fancier method: Have one camera, but switch by moving its localPosition between the 1st person position and the 3rd person position. This results in a smooth transition.

\$\endgroup\$
  • \$\begingroup\$ Tnx so Much @Philipp \$\endgroup\$ – Mordechai Hadad May 15 '16 at 21:20
  • \$\begingroup\$ I suppose that this is available if i want to make switch between ortographic camera to persepctive by clicking a single button. :-? \$\endgroup\$ – Elias Nov 21 '17 at 8:14
  • \$\begingroup\$ @Skywrath Yes, you could do that too with two cameras. You could also change the camera parameters at runtime. However, there is no good way to interpolate between perspective and orthographic projection. The transition will always seem a bit rough. \$\endgroup\$ – Philipp Nov 21 '17 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.