converting mobile input to mouse input

Who knows how to convert this unity spaceship code from iOS to desktop with mouse input?

any help appreciated

var turnSpeed : float = 3.0;
var maxTurnLean : float = 70.0;
var maxTilt : float = 50.0;
var Offsett : float = 0.6;
var sensitivity : float = 1.0;

var forwardForce : float = 20.0;
var guiSpeedElement : Transform;
var craft : GameObject;

private var normalizedSpeed : float = 0.2;
private var euler : Vector3 = Vector3.zero;

var horizontalOrientation : boolean = true;

function Awake () {
	//if (horizontalOrientation)
//	{
//		iPhoneSettings.screenOrientation =
//			iPhoneScreenOrientation.LandscapeLeft;
//	}
//	else
//	{
//		iPhoneSettings.screenOrientation =
//			iPhoneScreenOrientation.Portrait;
//	}
	
	guiSpeedElement = GameObject.Find("GUIspeed").transform;
	guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
}

function FixedUpdate () {
	// new screen orientation 
//	   if ((iPhoneInput.orientation == iPhoneOrientation.LandscapeLeft)  (iPhoneSettings.screenOrientation != iPhoneScreenOrientation.LandscapeLeft)) 
//   { iPhoneSettings.screenOrientation = iPhoneScreenOrientation.LandscapeLeft; } 
//    
//   if ((iPhoneInput.orientation == iPhoneOrientation.LandscapeRight)  (iPhoneSettings.screenOrientation != iPhoneScreenOrientation.LandscapeRight)) 
//   { iPhoneSettings.screenOrientation = iPhoneScreenOrientation.LandscapeRight; }

// end new
	if(GameObject.FindWithTag("SpaceCraft"))
	{
		GameObject.FindWithTag("SpaceCraft").rigidbody.AddRelativeForce(0, 0, normalizedSpeed * (forwardForce*3));
	
		var accelerator : Vector3 = Input.acceleration;

		if (horizontalOrientation)
		{
			var t : float = accelerator.x;
			accelerator.x = -accelerator.y;
			accelerator.y = t+Offsett;  // Sets the tilt angle offset to Offset Variable

		}
	
		// Rotate turn based on acceleration		
		euler.y += accelerator.x * turnSpeed;
		// Since we set absolute lean position, do some extra smoothing on it
		euler.z = Mathf.Lerp(euler.z, -accelerator.x * maxTurnLean, 0.2);

		// Since we set absolute lean position, do some extra smoothing on it
		euler.x = Mathf.Lerp(euler.x, accelerator.y * maxTilt, 0.2);
	
		// Apply rotation and apply some smoothing
		var rot : Quaternion = Quaternion.Euler(euler);
		
		GameObject.FindWithTag("SpaceCraft").transform.rotation = Quaternion.Lerp (transform.rotation, rot, sensitivity);
	}
}

function Update () {
	for (var evt : Touch in Input.touches)
	{
		if (evt.phase == TouchPhase.Moved)
		{
			normalizedSpeed = evt.position.y / Screen.height;
			guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
		}
	}
}

It depends on what you’re looking for. That script uses an accelerometer - something that doesn’t really translate to desktops.

Basically I like to convert accelerometer input wich controls the spaceship movement left right up down, into mouse / joystick movement.

It is from the Unity - Manual: Getting started with iOS star shooter demo.
I really like the way this spaceship controls and like to port it to the web player/ desktop.

The problem is I can’t get my head around the math involved with converting this accelerometer input controls to joystick/mouse.

Sure - just take a look at Input.GetAxis and modify the script to use that instead of Input.acceleration.

thanks but when I try this I get this error

PlayerControls.js(45,51): BCE0022: Cannot convert ‘function(String): float’ to ‘UnityEngine.Vector3’.