質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,4 +25,12 @@
|
|
25
25
|
transform.rotation = startRotation * Quaternion.Euler(0f, 0f, dblLength);
|
26
26
|
}
|
27
27
|
|
28
|
+
```
|
29
|
+
|
30
|
+
### 追記
|
31
|
+
|
32
|
+
ご回答いただいたコードで、-30~30の範囲となったのですが、-30からの開始となってしまいます。
|
33
|
+
-30~30の範囲で、0から開始させる方法はありますか?
|
34
|
+
```C#
|
35
|
+
float dblLength = 2 * Mathf.PingPong((Time.time-startTime)*speed, length) - length;
|
28
36
|
```
|