Camera mouvement over the player (orbit style)

Hi All,

I’m looking for a specific add-on on Unity for iOS. I would like to be able to move the camera around the player with 1 finger). The movement would be an orbit, looking at the player (moving player).

The player is on the ground. The Camera is in the air, looking down to the player and turning around according to the gesture.

Do you know of a plugin on the Store or a script on the WIKI to achieve that ?

Thank you all.

The Penelope demo project is free on the asset store, and has a few different permutations of that.

well… it’s all in Javascript… don’t think I’ll use JS.

What you’re asking for is fairly simple. If you want it to orbit circularly at a fixed height just write something along the lines of:

(C#)

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour {
	
	public Camera m_cam;
	public GameObject m_player;
	
	private float m_fixedHeight = 2.0f;
	private float m_fixedDistance = 10.0f;
	private float m_orbitSpeed = 1.0f;
	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		Vector3 camPos = m_player.transform.position;
		
		camPos.y += m_fixedHeight;
		camPos.x += Mathf.Sin(Time.realtimeSinceStartup * m_orbitSpeed) * m_fixedDistance;
		camPos.z += Mathf.Cos(Time.realtimeSinceStartup * m_orbitSpeed) * m_fixedDistance;
		
		m_cam.transform.position = camPos;
		m_cam.transform.LookAt(m_player.transform.position);
	}
}

All you have to do is drop the player and the camera onto the script in the inspector window and play with those distance and height variables until it looks how you want it.

edit: I notice you wanted it to be based off touch input… simply change the “Time.realtimeSinceStartup” to a value based off the touch. How it is atm will just have the camera continuously orbit the player.

Thank you for your answer. I’ve bought FingerGesture on the AssetStore, it does exactly what I want + A lot of features around gestures.
Thanks anyway.