Search Unity

Simple fpsWalker/camera -- Free Floating

Discussion in 'Scripting' started by MBomberZ1, Aug 21, 2009.

  1. MBomberZ1

    MBomberZ1

    Joined:
    Jul 28, 2009
    Posts:
    65
    I feel like there has to be one of these floating around i just cant seem to find what im looking for though.

    In my current project i would like to use a simple free floating camera as the character. With the ability to fly through the 3d space. If your view is angled slightly up and you press the forward key, you should move forward and up in the same direction that your view is pointed. This would allow you to fly through space.

    I know one has got to be around here somewhere :)
     
  2. Digitalos

    Digitalos

    Joined:
    Jun 1, 2009
    Posts:
    112
    This would seem like a good candidate to try and create yourself, as it's the most simple of cameras really.

    You could take a camera, parent it to your game object and then add on a movement script. The script will just get your current forward vector, and when it detects input, move you along that forward vector. There are already scripts in StandardAssets that compensate for mouselook.
     
  3. MBomberZ1

    MBomberZ1

    Joined:
    Jul 28, 2009
    Posts:
    65
    I am trying to figure out where to start with this. It feels very much over my head trying to understand what to call and how to use this information correctly.

    I will be using getVector, vector3 and move direction.z? these are the main things when researching the standard camera and suggestions from your post that i have come up with.
     
  4. MBomberZ1

    MBomberZ1

    Joined:
    Jul 28, 2009
    Posts:
    65
    I really do not understand which axis i should be using, or what to do! I hate to ask for help like this with what seems like no effort on my part but iv been here fumbling around for the last 4 hours on this and im not getting anywhere.

    Which vector do i have to get from the camera? Do i have to enable rotation on the Y axis of the character controller so that the Z vector can change allowing me to take off? Ahh so confused :/