Search Unity

Camera pan direction and movement direction

Discussion in 'Editor & General Support' started by ptmorris, Nov 26, 2014.

  1. ptmorris

    ptmorris

    Joined:
    Nov 26, 2014
    Posts:
    3
    Apologies if this has already been asked, resolved or is just too an plain obvious question \ answer.

    In a first person scenario, can a character move forward\backwards yet look in a different direction? Whenever the mouse is used to change the direction in which the character looks it over rules the keyboard input and the character changes direction.

    Somewhat frustrating.
     
  2. ptmorris

    ptmorris

    Joined:
    Nov 26, 2014
    Posts:
    3
    I take it that this feature is unavailable within Unity?
     
  3. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    The Unity camera can be scripted, so you can write code that moves the camera in whatever direction you want, but not have it affect the direction the player is moving in.

    What is the script you have written? Perhaps you are using some of the standard assets which might be aimed at the more usual fps behaviour of the mouse changing the direction of the player and the camera.
     
  4. ptmorris

    ptmorris

    Joined:
    Nov 26, 2014
    Posts:
    3
    Dear Graham,

    Thank you for taking the time to reply and please accept one's apologies for not replying sooner. Other things got in the way of this project ... life, eh?

    I didn't realise that a script had to be written to accomplish this. Not being a coder any more (bailed out at Z80 assembler and BASIC) I will have to work a bit harder. At least I now have a direction to look into.