Thank you for your reply @KellyRay.
My ship is still not rotating. This is my C# script:
-----------------------------------------
using UnityEngine;
using System.Collections;
using UnityStandardAssets.CrossPlatformInput;
public class RotateShoot_2 : MonoBehaviour
{
// Update is called once per frame
void Update ()
{
Vector3 vNewInput = new Vector3(CrossPlatformInputManager.GetAxis("HorizontalR"), CrossPlatformInputManager.GetAxis("VerticalR"), 0.0f);
}
void rotatePlayer ()
{
var angleRadians = Mathf.Atan2(CrossPlatformInputManager.GetAxis("HorizontalR"), CrossPlatformInputManager.GetAxis("VerticalR"));
var angleDegrees = angleRadians * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler(0, 0, angleDegrees);
}
}
-----------------------------------------
I know the right joystick is working as when I add a FSM with Cross Platform Get Axis with HorizontalR and VerticalR, I get numbers from the debug field (i.e. 0 at start and changes from -.99 to +.99 when I move the right joystick).
The script is dropped on the Player. I have removed any rotation constraints except for Z-Position. Project settings Input has the HorizontalR and VerticalR set to Joystick 2.
I am tearing out what little (read: none) hair I have left over this challenge. I just can't see what I am doing wrong. I have looked at youtube tutes as well as various forums and QnA sites.
Any help would be most appreciated. Thanks.