- Home /
Question by
shlomito36 · Mar 18, 2013 at 10:11 PM ·
androiderror
errors building on android
I have done a "test" game for android. In my computer it's all fine, but in my phone there are some problems... a) The skybox dosn't show up... b) The player vibrates while it's moving or jumping... Here is the movement code:
#pragma strict
var speed : float = 6.0;
var jumpSpeed : float = 8.0;
var gravity : float = 20.0;
private var moveDirection : Vector3 = Vector3.zero;
function Update() {
var controller : CharacterController = GetComponent(CharacterController);
if (controller.isGrounded) {
// We are grounded, so recalculate
// move direction directly from axes
moveDirection = Vector3(1, 0, 0);
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= speed;
if(Input.touchCount > 0){
if(Input.GetTouch(0).phase == TouchPhase.Began){
moveDirection.y = jumpSpeed;
}
}
if(Application.isWebPlayer || Application.isEditor || Application.isPlayer){
if (Input.GetButton ("Jump")) {
moveDirection.y = jumpSpeed;
}
}
}else{
}
// Apply gravity
moveDirection.y -= gravity * Time.deltaTime;
// Move the controller
controller.Move(moveDirection * Time.deltaTime);
}
I can't overcome all this alone (I tried a lot), so help me please! thank you very much!!!
Comment
Your answer
Follow this Question
Related Questions
Error Building Player: 'aapt.exe' Win32Exception 3 Answers
Connect Andorid Phone and get error 1 Answer
BCE0044 unexpected char: 0xFEFF 2 Answers
Unity Editor & iOS - Download MP4 to Streaming Assets Folder 0 Answers
HELP! Building Player: Exception Android (invokation failed) Error Unkown Error 1 Answer