// 自动矿机 // Token: 0x06002366 RID: 9062 RVA: 0x000BFFA8 File Offset: 0x000BE1A8 public void UpdateRotation(float dt) { if (this.HasDigCell) { // 将挖掘单元格转换为位置坐标 Vector3 a = Grid.CellToPosCCC(this.dig_cell, Grid.SceneLayer.TileMain); a.z = 0f; // 获取当前机械臂的位置坐标 Vector3 position = this.arm_go.transform.GetPosition(); position.z = 0f; // 计算目标方向向量 Vector3 target_dir = Vector3.Normalize(a - position); // 旋转机械臂朝向目标方向向量 this.RotateArm(target_dir, false, dt); } }

自动矿机:机械臂旋转更新

原文地址: https://www.cveoy.top/t/topic/oSv9 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录