贝塞尔运行轨迹
发布时间
阅读量:
阅读量
1、首先构建三个球体

2、构建脚本
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DrawBesizerLine : MonoBehaviour
{
public GameObject[] basePoint; //基础点
public int baseCount = 500; //两个基础点之间的取点数量 值越大曲线就越平滑 但同时计算量也也越大
public static List
public Transform sphere; //目标小球
float speed = 40.0f; //运动速度
float length = 0; //小球当前的运动轨迹长度
LineRenderer lineRender;
void Start()
{
lineRender = gameOb
全部评论 (0)
还没有任何评论哟~
