unity--12 将物体移动至多个路点位置
发布时间
阅读量:
阅读量

当前的任务是将立方体转移至point01与point02这两个坐标点。然而目前尚未找到明确的解决思路,因此决定先对问题进行简化,尝试使物体移动至某个特定坐标位置,例如(5,5,5)。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Update is called once per frame
void Update ()
{
if (transform.position.x<=5&&transform.position.y<=5&&transform.position.z<=5) {
transform.Translate (1*Time.deltaTime, 1*Time.deltaTime, 1*Time.deltaTime)
全部评论 (0)
还没有任何评论哟~
