PUN Basic Tutorial - 6 - Player Camera Work

With the CameraWork script and math inside this script i can't get the desired camera angle on my player. When i tweak the parameters in inspector i can't get any of them to move the camera above the player to get top down look. I need camera to go above the player to look down on him like in this screenshot http://prntscr.com/oask4p. This is done by the different script which can't be used because it is attached to camera and requires target transform. With the script from Pun Basic Tutorial, "CameraWork" this is the best angle i get http://prntscr.com/oasktf

I dont fully understand the math in your code so i need advice for that part of the code. I want to add parameter or tweak the current ones to get the camera angle to move above the player for the look above / top down look.

Current parameters only move the camera up, down, left and right.

This is the math part inside CameraWork script



  • Hi @Admir,

    We cannot understand what you are trying to describe.
    Try to rephrase and answer the following questions:

    - what is the issue exactly? is it in the demo code? is it in the documentation of the demo? or in your own custom code?
    - can you reproduce with the demo scene in a fresh empty clean new project with just PUN imported?
    - what is the expected behaviour? what is the actual behaviour?
    - what PUN version are you using?
    - what Unity version are you using?