Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

eulerAngles not accounting multiple instances

Discussion in 'Navigation' started by ryanmerritt25, Jun 18, 2015.

  1. ryanmerritt25


    Nov 1, 2013
    So i'm making a 3d spaceship game and i'm trying to get the pitch and yaw set up and they work just fine EXCEPT when i have more than one eularAngle in the code. It will only register the most recent code instead of all of them when i hit play. In the code below it will only register "Roll" but not "Horizontal" and if i were to switch them around it would register "Horizontal" but not "Roll". Please help

    Code (CSharp):
    1.     void FixedUpdate () {
    3.         pitch += Input.GetAxis ("Horizontal");
    4.         transform.eulerAngles = new Vector3(0,0,pitch + speed);
    6.         roll += Input.GetAxis("Roll");
    7.         transform.eulerAngles = new Vector3(roll,0,0);