+ Reply to Thread
Results 1 to 5 of 5

Thread: Cam Controller Orbit

  1. #1
    Wiremode Helper Techni's Avatar
    Join Date
    Jul 2008
    Posts
    773
    Blog Entries
    1

    Default Cam Controller Orbit

    I've linked up the pitch and yaw of a cam controller to a pod controller, and the X Y Z to a GPS in the middle of my ship, however, I've noticed that it simply pivots around a point, and the zoom option only allows zooming in and not out. So I was wondering if it is possible to have the camera orbit around the point (Like vehicles in third person mode)?

    Any help you can offer is appreciated.

    Edit: I've already tried vector methods however my vector mathmatics is sketchy at the moment (Summer holidays will do that).
    Last edited by Techni; 09-17-2008 at 01:11 PM.

  2. #2
    Wiremode Helper Techni's Avatar
    Join Date
    Jul 2008
    Posts
    773
    Blog Entries
    1

    Default Re: Cam Controller Orbit

    Nevermind, with thanks to a friend I found out how to do it simply, for those interested:

    Code:
    N@CameraOrbit
    I@X Y Z Bear Elev Dist 
    O@A B C Pitch Yaw
    
    
    A = X + -Dist * cos(Elev) * cos(Bear)
    
    B = Y + -Dist * cos(Elev) * sin(Bear)
    
    C = Z + -Dist * sin(Elev)
    
    Pitch = -Elev
    
    Yaw = Bear
    Where X Y and Z are the co-ordinates of the GPS you want to rotate around, Bearing and Elevation are from the pod controller, and Dist is the distance you want the camera to orbit at. A B and C go into X Y and Z on the cam controller respectively, Pitch and Yaw go into the cam controller likewise.

  3. #3
    Lifetime Supporter shadowkeeper's Avatar
    Join Date
    Jul 2007
    Location
    Heffen, Belgium
    Posts
    478

    Default Re: Cam Controller Orbit

    Very nice, I was looking for something like this, thanks!
    I am nowhere, yet I am everywhere, I am the eyes that don't see but see all, I am therefore I live


  4. #4
    Wire Amateur zentiger's Avatar
    Join Date
    Jul 2007
    Location
    Norfolk, VA
    Posts
    98

    Default Re: Cam Controller Orbit

    Sine and cosine make a happy circle... It's easy as pi. (Sorry, had to do it, couldn't resist)

    "Not everything that counts can be counted, and not everything that can be counted counts." -Sign hanging in Albert Einstein's office at Princeton


  5. #5
    Wire Weeaboo Pyro-Fire's Avatar
    Join Date
    Aug 2007
    Location
    WA, Australia
    Posts
    1,804

    Default Re: Cam Controller Orbit

    lol.

    Good trig work, Gmod EVE here we come!



+ Reply to Thread

Similar Threads

  1. Turret with Adv. Pod Controller and Cam Controller?
    By Jaded Misanthrope in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 07-21-2008, 11:47 AM
  2. Orbit?
    By -|Raveness|- in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 04-11-2008, 07:18 PM
  3. Automated satellite Orbit Guidence System?
    By Locklear in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 11-26-2007, 03:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots