Search Unity

authoritative fps mouse input

Discussion in 'Multiplayer' started by joshua-jebadurai, Jul 22, 2010.

  1. joshua-jebadurai

    joshua-jebadurai

    Joined:
    Jul 3, 2009
    Posts:
    14
    I'm making an authoritative multiplayer fps, it works fine when sending just the "horizontal" and "vertical" a.k.a keypress inputs. The problem occurs when sending mouse inputs to the server because it works based on mouse sensitivity..the server acts completely different from client side, so the prediction gets really screwed up.

    anyone have a work around for this problem ? I kinda solved it but still there is bit of lag.[/code]
     
  2. joshua-jebadurai

    joshua-jebadurai

    Joined:
    Jul 3, 2009
    Posts:
    14
    Don't worry about it, I have solved it. I'll post a full authoritative fps soon. Thank you. :D
     
  3. Drippy

    Drippy

    Joined:
    Jul 13, 2013
    Posts:
    6
    Sorry for commenting on an such an old thread, but I have the same problem and was wondering if you still had that script code laying around.
     
  4. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Just curious, but why would you make mouse looking authoritative? Aimbots exploiting lookat on clientside?
     
  5. Drippy

    Drippy

    Joined:
    Jul 13, 2013
    Posts:
    6
    Since I'm using an authoritative multiplayer game (more of a simulation), a player can't rotate/move his character client-side and must ask the server to do it for him. I attach this script to the parent object of a player's character and set it so the player would be able to rotate his character horizontally. I do the same with a child object that has the camera component and set it to only work in y-axis, but this one doesn't necessarily need to be authoritative (as it wont affect anything).
     
  6. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Yea it seems like it would just use up memory