- Home /
converting 3th person camera
I need to converting 3th person camera to not require ThirdPersonController script and use my own controler i am using the 3th person camera script from the Standard Assets folder and it worked well until I removed character controller. I know the 3th person camera script depends on it but is there a way to change it to use this.
// Move object using accelerometer var speed = 10.0;
function Update () {
var dir : Vector3 = Vector3.zero;
// we assume that device is held parallel to the ground
// and Home button is in the right hand
// remap device acceleration axis to game coordinates:
// 1) XY plane of the device is mapped onto XZ plane
// 2) rotated 90 degrees around Y axis
dir.x = -Input.acceleration.y;
dir.z = Input.acceleration.x;
// clamp acceleration vector to unit sphere
if (dir.sqrMagnitude > 1)
dir.Normalize();
// Make it move 10 meters per second instead of 10 meters per frame...
dir *= Time.deltaTime;
// Move object
transform.Translate (dir * speed);
}
also I get this notice "Please assign a target to the camera that has a ThirdPersonController script attached. UnityEngine.Debug:Log(Object) ThirdPersonCamera:Awake() (at Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js:58)"
The third-person controller from the standard assets isn't very good. I recommend writing your own one of those, as well! See if you can find a mouse-orbit script on the Unify Wiki- there are a few nice ones.
I allready have a controller i need to find camera do you know of any
Use google! It's useful. This took me exactly 20 seconds to find:
http://unifycommunity.com/wiki/index.php?title=$$anonymous$$ouseOrbitImproved
You should learn how to locate this kind of information. It's much easier than asking questions!
that script works very well on pc unfortunatly my platform is android i'll look for one that uses touch but if you know one please tell