Search Unity

3rd Person Camera

Discussion in 'Scripting' started by gore23, Jun 4, 2011.

  1. gore23

    gore23

    Joined:
    Jan 18, 2011
    Posts:
    324
    How would you make a 3rd person camera that moves to point of objects that are between it and the player, and also when it moves into a objects it remains at the edge of the model not in it.
     
  2. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
  3. gore23

    gore23

    Joined:
    Jan 18, 2011
    Posts:
    324
    I am having trouble integrating it cause idk the buttons they got inputed XD
     
  4. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    90% of the scripts on that page run a general (accepted) 3rd person camera. WASD to move space to jump. The left mouse button when moved moves the camera but leaves the character's facing, the right mouse button when moved rotates the character. When both mouse buttons are pressed it moves the character in the direction of the camera.
     
  5. gore23

    gore23

    Joined:
    Jan 18, 2011
    Posts:
    324
    do I just name them left mouse , w , s , a , d inc ...

    or by chance would you know the button info to use XD im sorry im new to this and Im decent at basic scripting and working to get better XD


    also I had 2 questions.

    A. What is that clamping feature in the script how does it work ?

    B. what is a Static Function ?


    sorry so much questions XD first scripting language im learning and so far im doing catching on alot more than i thought i would scripting so much funner than I thought it would be.