Third person controller Script

Discussion in 'Scripting' started by appleunited, Jul 8, 2011.

  1. appleunited

    appleunited

    New Member

    Joined:
    Dec 25, 2010
    Messages:
    99
    Hi guys,

    Currently I am using the third person controller and camera scripts that come with unity3d. May I know if there is a way to make the turning less abrupt and smooth? Currently each time, I press the left/right key, it will turn 90 degrees. I tried to change a couple of variables like the key sensitivity, rotation speed, etc but nothing helps. Can anyone point me the right direction?

    Cheers
  2. appleunited

    appleunited

    New Member

    Joined:
    Dec 25, 2010
    Messages:
    99
    Can anyone help? Thanks. :)
  3. Nikdy98

    Nikdy98

    New Member

    Joined:
    Jul 6, 2011
    Messages:
    192
    change the sensitivity?
  4. appleunited

    appleunited

    New Member

    Joined:
    Dec 25, 2010
    Messages:
    99
    I tried that already but there isn't much use. I think the sensitivity is more of how fast it reacts to your control but somehow it still makes a 90 degrees turn. My horizontal input comes from the keyboard "A" and "D" keys.
  5. Tiles

    Tiles

    Member

    Joined:
    Feb 5, 2010
    Messages:
    2,178
    The third person controller that comes with Unity is a bit complicated to follow and to understand. Lots of code. Making your own controller may be the easier way here. Sorry that i have no better advice.
  6. appleunited

    appleunited

    New Member

    Joined:
    Dec 25, 2010
    Messages:
    99
    Hi Tiles,

    Kind of agree with you. I have been spending the past 2 days trying to understand the codes but still quite lost (new to 3d gaming).. It is a convenient way to get things started but any customization after that is a pain..

    Anyway, thanks for your advice.
  7. MidnightQC

    MidnightQC

    New Member

    Joined:
    Jul 9, 2011
    Messages:
    2
    Both scripts are faily easy to follow and they do exactly what they mean to do, which is the exact opposite of what you are trying to acheive.

    Thoses 2 scripts are working together to allow the player to move around by "pointing" where they wanna go. It's the direction of movement that is retrieved from input. Pressing 'A' means: i wanna go to the left in reference to the camera point of view. It doesnt mean i want to turn left.

    Nowhere in thoses scripts there is an actual rotation made to your avator. The rotation you see in the scripts are to "lineup" your avator's foward vector with his direction of movement. This is why you think you are rotating your avator by 90deg.

    So your only options left are either write your own controllers or search the web for an already implemented solution.

    Hope it clears it up.
    Good luck.
  8. appleunited

    appleunited

    New Member

    Joined:
    Dec 25, 2010
    Messages:
    99
    That definitely clear things up a lot! Appreciate your input.. Hope I can find some scripts to help me out.