Unity uses the motion effect of Bezier curve

It can be used to collect gold coins, collect experience, and missiles to attack the enemy's smooth motion transition effect.
Let's see the effect first.
insert image description here

the code

using UnityEngine;

public class BezierCurve : MonoBehaviour
{
   
    
    
    public Transform target; // 目标点
    public float speed 

Guess you like

Origin blog.csdn.net/qq_36303853/article/details/130713435