You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unity C#:如何让两个反向绕点的物体沿曲线轨道运行?

双球体反向环绕拖尾实现方案

我现在的实现思路是这样的:两个球体,一个挂载了正向逻辑的函数,另一个挂载了反向逻辑的同名函数,两者都配置了拖尾效果,它们环绕的目标是一个固定在(0,0,0)位置的球体。以下是我当前编写的代码(部分未完成):

float t = 0;
float speed;
float width;
float height;
int cat = 0;
public GameObject orbit; //环绕目标物体

//初始化函数
void Start() {
    speed = 2;
    width = 5;
    height = 2;
    InvokeRepeating("test", .001f, .009f);
}

void test() {
    t += Time.deltaTime * speed...

内容的提问来源于stack exchange,提问作者TheJavaKing

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:35:08