【发布时间】:2020-09-30 22:57:42
【问题描述】:
所以我遇到了这个困扰我一段时间的问题,我需要让 3 个游戏对象以基本设定速度的 % 速度移动。那部分很容易。现在的问题是我无法让它移动到设定的位置,然后传送到我面前并继续, 非常感谢您的帮助!
更新功能
void Update()
{
//suuuuper bad implemantation
float newPos = Mathf.Repeat(Time.time * globalspeed, 20);
Ground1.transform.position = startpos + new Vector2(reset, upPos1) * newPos * Ground1Speed;
Ground2.transform.position = startpos + new Vector2(reset, upPos2) * newPos * Ground2Speed;
Ground3.transform.position = startpos + new Vector2(reset, upPos3) * newPos * Ground3Speed;
}
【问题讨论】:
标签: c# unity3d game-physics parallax