unity3D技术之屏幕内跟随鼠标移动.pdfVIP

  • 6
  • 0
  • 约1.45千字
  • 约 2页
  • 2021-12-01 发布于江苏
  • 举报
由于是在屏幕内跟随鼠标移动,我们知道,在屏幕上鼠标位置的Z坐标的值为0,所以我们要将物体 的位置坐标Z赋值给鼠标的Z; 1 using UnityEngine; 2 using System.Collections; 3 4 public class Follow: MonoBehaviour { 5 Vector3 world;//物体要移动到的位置 (世界坐标系) 6 float moveSpeed=0;//物体移动速 7 8 void Update(){ 9

文档评论(0)

1亿VIP精品文档

相关文档