ImageCamera
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MainGame : MonoBehaviour
{
public float speed;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved)
{
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
transform.Translate(-touchDeltaPosition.x * speed, -touchDeltaPosition.y * speed, 0);
}
}
}
Я сделал 3D-игру и хочу, чтобы моя камера оставалась в фиксированном положении и просто вращалась, это сценарий, который я использовал. Что мне нужно добавить, чтобы исправить камеру и просто повернуть?