1、位移 首先我们找到两张图片,一个大圆一个小圆,像这样: 结构是这样的: 然后,新建一个场景,用胶囊去做玩家,摄像机在胶囊下,并且在场景中放两个cube作为参照物 像这样搭好后,我们编写脚本,用ScrollRect去实现摇杆,新建ScrollCircle.cs脚本,继承ScrollRect: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class ScrollCircle : ScrollRect { float radius = 0; public Vector2 output; void Start() { output = new Vector2(); radius = (transform as RectTransform).rect.size.x * 0.5f; } public override void...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile