Search Unity

Camera position on back of the sphere

Discussion in 'Navigation' started by bogdanalin92, Sep 30, 2016.

  1. bogdanalin92

    bogdanalin92

    Joined:
    Nov 27, 2015
    Posts:
    3
    How to move a sphere like a third person shooter, but with rotation of the sphere and camera to stay behind of the move direction of the sphere?

    Please help, i tried a bunch of scripts and nothing worked correctly, sometimes when i make camera a child of the sphere the camera rotates around the sphere.

    To move the sphere i use .rigidbody.AddForce();
     
  2. TWicked

    TWicked

    Joined:
    Nov 8, 2013
    Posts:
    14
  3. bogdanalin92

    bogdanalin92

    Joined:
    Nov 27, 2015
    Posts:
    3
    The idea is, that i want the camera to be behind of a sphere and follow it, but when i move the sphere to the right i want the camera to be behind the sphere pointing the towards right direction, just like you rotate a character and the camera stay behind, (Ex: GTA IV).

    The tutorial just show how to make camera track an object on scene.
     
  4. narf03

    narf03

    Joined:
    Aug 11, 2014
    Posts:
    223
    Drag your "main camera" into your sphere(so it should be under sphere's treeview), then adjust the angle of that camera
     
  5. bogdanalin92

    bogdanalin92

    Joined:
    Nov 27, 2015
    Posts:
    3
    You mean to make it a child of sphere, then the camera will rotate with the sphere.
     
  6. narf03

    narf03

    Joined:
    Aug 11, 2014
    Posts:
    223
    Ya, sorry that my english is pretty limited.
     
  7. kdarius43

    kdarius43

    Joined:
    Mar 16, 2015
    Posts:
    170
  8. mobee555

    mobee555

    Joined:
    Feb 28, 2017
    Posts:
    1
    Just go for the roll a ball tutorial.

    It might help you :)