有一个圆,它需要按下按钮旋转,以一定的速度沿z轴旋转,当它转动90时,旋转会停止,但由于某种原因,旋转不能正常工作。
public GameObject Circle;
private bool RotationActive;
//rotation value at which the circle stops rotation
private float RotatePost;
private float RotationSpeed;
private float CircleRotateZ;
void Start()
{
RotationActive = false;
我有一个简单的脚本来移动和查看,当我转动相机时,相机没有随着角色转动,我如何让它们一起转动。
using System.Collections.Generic;
using UnityEngine;
public class PlayerFollow : MonoBehaviour
{
public Transform PlayerTransform;
private Vector3 _cameraOffset;
public float rotationSpeed = 1;
public Transform Target, Player;
float