+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Pod Controller - Lock camera .. second time to suggest.

  1. #1
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Lightbulb Pod Controller - Mouselook (added a demo program)

    This is my 2nd time to make this suggestion. The first time it went pretty much ignored because I think many people did not understand what I was talking about. So I'm trying again.

    Read everything carefully!

    The idea is to have an input on the Adv Pod Controller that locks your view when sitting in a seat. It locks it meaning you're always looking straight ahead and you can't look around with your mouse while sitting in a seat.

    There's an extremely good reason for this, but first I have to explain something.

    In 3D games, there's a very common technique used to control the camera with the mouse. There is a simple function run on a timer. Every few milliseconds, the function resets the position of the mouse cursor to center screen (screen width/2, screen height/2). Each time the function is run, it returns (outputs) the distance your mouse cursor has moved (both x and y) since it was last reset to center screen. This gives you information about the speed and direction you moved your mouse, and uses that data to control the speed and direction of the camera. So moving your mouse fast and to the left, it might return -20 along the x axis. Moving fast to the right would be +20 along the x axis. Moving SLOW to the right might be +5 (-5 to the left) etc.

    Now, in addition to locking the camera in place with the pod controller, it would also operate in the way described above and output "Mouse X Change" and "Mouse Y Change".

    What would this be good for? Everything. You'd be able to control an airplane using only your mouse, or a car, or a cannon, or a mini-game.. anything.. the sky is the limit. Right now, mouse controlled contraptions are very limited because you are only given access to pitch and yaw and your camera moves around when you sit in a seat and move your mouse, which makes it difficult to control anything with the mouse.

    This could be used with the joypad input thing too for very precise control with a gamepad or joystick.

    Please make this happen!



    EDIT:
    I made a simple demonstration (windows application). It is attached. Once the window opens up, don't move it.. just leave it where it opens. There's a bug that will screw it up if you move it.

    This should give you guys a good idea of what I'm talking about. Just click the start button and move your mouse around. This is exactly the sort of thing we need for the Adv Pod Controller.


    Attached Files Attached Files
    Last edited by Beer; 08-17-2008 at 07:24 PM. Reason: typo

  2. #2
    Wirererer 3dfactor's Avatar
    Join Date
    Aug 2008
    Posts
    178

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Correct me if I'm wrong, but...

    As far as I know, gmod uses the standard vehicles (or seats) that comes with source engine, their outputs and inputs (I think) are given exactly (or close to) the same as in HL2 itself. You can emulate such behavior with Cam Controller, but you can't be precise because if you're taking the bearing values then with low or high pitch it spazes out, and with world coordinates, well, it gives your targeted coordinates, and your targeting is relative to the vehicle you're in, so the seat rotates - your target rotates too (infinite loop :P ).
    So, in some cases you actually can emulate your desired behaviour, but it's still limited and its response time is adjusted to the force of the vehicle, gravity and other stuff.
    Is it possible to write such thing as a separate module for gmod? Dll? LUA ???




    Try it...


    Cheers!
    2d head with 3d brains

  3. #3
    Wirererer Generic Default's Avatar
    Join Date
    Jul 2008
    Location
    Jalalabad, Afghanistan
    Posts
    321

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    I made a post about this a while ago. Nobody seems to respond! I think they don't understand, even with the example. But really, I've been wanting this for like a year now!

    By the way, what does "lol" or "lawl" or "lulz" mean?
    Last edited by Generic Default; 08-18-2008 at 03:17 PM.

  4. #4
    Not a bot itsbth's Avatar
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    1,173

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    We can't control the mouse from Lua.

  5. #5
    Wire Amateur fishface60's Avatar
    Join Date
    Feb 2008
    Posts
    56

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Just having X and Y velocity of the mouse would be enough, you can just stick a camera on your contraption to fix the view, but elevation stops at 90 degrees.

  6. #6
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Quote Originally Posted by itsbth View Post
    We can't control the mouse from Lua.
    You wouldn't have to control the mouse. As long as you're able to determine how much the mouse has moved between ticks, you can get the rate of change needed. It should be possible to simulate a cursor using an invisible point across a 2D plane.. managed through code.
    Last edited by Beer; 08-19-2008 at 06:00 PM.

  7. #7
    Wirererer 3dfactor's Avatar
    Join Date
    Aug 2008
    Posts
    178

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Quote Originally Posted by Beer View Post
    You wouldn't have to control the mouse. As long as you're able to determine how much the mouse has moved between ticks, you can get the rate of change needed. It should be possible to simulate a cursor using an invisible point across a 2D plane.. managed through code.
    Like fishface60 said, you can emulate your desired effect by making a camera on your contraption (cam controller) and moving the contraption according to the delta of mouse movement. Now, the only catch is to get rid of the 180 to -180 break, as most of thruster systems (at the moment) spazes out in such situations.
    2d head with 3d brains

  8. #8
    Wire Amateur fishface60's Avatar
    Join Date
    Feb 2008
    Posts
    56

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Quote Originally Posted by 3dfactor View Post
    Like fishface60 said, you can emulate your desired effect by making a camera on your contraption (cam controller) and moving the contraption according to the delta of mouse movement. Now, the only catch is to get rid of the 180 to -180 break, as most of thruster systems (at the moment) spazes out in such situations.
    Isn't that the use of the angnorm() function for the expression chip?

  9. #9
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Quote Originally Posted by fishface60 View Post
    Isn't that the use of the angnorm() function for the expression chip?
    No, angnorm converts 0 -> 360 to -180 -> 180. To convert the other way, you just have to do Angle%360

    Anyhow, I will try with the cam controller.. I've actually never bothered to mess with that thing. I still wish this functionality existed in the pod controller, but we can't win 'em all I guess.
    Last edited by Beer; 08-21-2008 at 07:43 PM.

  10. #10
    Wirererer Generic Default's Avatar
    Join Date
    Jul 2008
    Location
    Jalalabad, Afghanistan
    Posts
    321

    Default Re: Pod Controller - Lock camera .. second time to suggest.

    Cam controllers work well for that, and there is a better way than getting a delta from it. Make a gyroscope on the thing facing down, then subtract pitch and yaw from seat bearing and seat elevation. If you do it right, you will end up with the number of degrees it's facing from the number of degrees it's supposed to be facing(like a beacon sensor). The only problem is that camera controllers don't save vehicle links. FIX IT!

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. camera controller
    By woo482 in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 09-28-2008, 08:34 AM
  2. Pod Controller view-lock and mouse X/Y outputs.
    By Generic Default in forum Ideas & Suggestions
    Replies: 3
    Last Post: 07-27-2008, 05:16 PM
  3. Toggle Camera via Pod Controller?
    By Reuter in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 07-21-2008, 07:43 AM
  4. Camera Controller w/ Pod
    By crazylincoln in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 07-05-2008, 06:40 PM
  5. Ability to lock people into vehicles using adv pod controller
    By _Kilburn in forum Ideas & Suggestions
    Replies: 1
    Last Post: 04-13-2008, 02:35 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