- Home /
What is best camera position for Android device.?
I have problem related to camera position on android devise.i am using camera position behind the player but on mobile this is't working settings i assigned.
Player Object Scripting Code
using UnityEngine;
using System.Collections;
public class Playercontroler : MonoBehaviour {
public float speed = 10.0F;
void FixedUpdate()
{
float moveHorizantail = Input.acceleration.y;
float moveVeritical = Input.acceleration.x;
Vector3 Movement = new Vector3 (moveHorizantail,0.0f,moveVeritical);
rigidbody.AddForce(Movement * speed * Time.deltaTime );
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Pickup")
{
other.gameObject.SetActive(false);
}
}
}
I seriously don't understand your problem. Please be more specific if you wish for an answer...
I am watching tutorial Rolling boll and was set position of camera behind the player abject and thy will work with player object but when i play game on android this will not work with as and also sensors not working correctly.I am editing question with player scripting code please check.
Sounds like it's really the movement which is the problem. Camera position should work equally well for any platform (it's not like Android can't handle negatives, or x past 100.)
Problem may be using acceleration
. That reads how much you shake the phone, not touches and drags.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to change camera visibility after certain distance? 0 Answers
Problem with camera in game mode. 0 Answers
How to make a camera follow an object 0 Answers