Different take on this

I wanted more of a starfox style rotation system in my game - here is how i did it!

 [SerializeField]
    float pitchRate, yawRate, rollRate;

 private void ControlRotation()
    {
        float yThrow = CrossPlatformInputManager.GetAxis("Vertical");
        float xThrow = CrossPlatformInputManager.GetAxis("Horizontal");

        float pitch = yThrow * pitchRate;
        float yaw = xThrow * yawRate;
        float roll = xThrow * rollRate;
        transform.localRotation = Quaternion.Euler(pitch,yaw,roll);

    }
5 Likes

Thanks for this, the movement seems more natural like this.

1 Like

Nice work, wow, hearing those sounds takes me back!

1 Like

As a gamer and a guy trying to reach his dreams of game design. I salute you sir. Epic truly awesome.

1 Like

Privacy & Terms