I recently finished the space shooter project in unity3d website and the games runs on the web brower bit when i build the android version and installed the apk the game launched and ran, i just cant control the space ship. Is there any complete tutorial for using unity to male an android game?
sure, here is the player controller script,for some reason the shooting works whenever i tough the screen but i cant move.
this is a little more organized for better reading, i used C#
http://unity3d.com/earn/tutorials/projects/space-shooter/moving-the-player
using UnityEngine;
using System.Collections;
[System.Serializable]
public class Boundary
{
public float xMin, xMax, zMin, zMax;
}
public class PlayerController : MonoBehaviour
{
public float speed;
public float tilt;
public Boundary boundary;
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.velocity = movement * speed;
rigidbody.position = new Vector3
(
Mathf.Clamp (rigidbody.position.x, boundary.xMin, boundary.xMax),
0.0f,
Mathf.Clamp (rigidbody.position.z, boundary.zMin, boundary.zMax)
);
rigidbody.rotation = Quaternion.Euler (0.0f, 0.0f, rigidbody.velocity.x * -tilt);
}
}