Skip to content

Commit d4035d2

Browse files
author
Ricardo J. Mendez
committed
Lightning bolt tethering
- Lightningbolt on the text scene is now tethered to the center - Adjusted values on the Pursuit scene, pursuers still need tweaking.
1 parent b5b81a0 commit d4035d2

20 files changed

+7
-2
lines changed

Assets/Scenes/Flat boids.unity

1.47 KB
Binary file not shown.

Assets/Scenes/Lightning.unity

377 Bytes
Binary file not shown.

Assets/Scenes/Pursuit.unity

393 Bytes
Binary file not shown.

Assets/Scripts

Submodule Scripts updated from 4826ddd to e5aece0

Assets/Sources/LightningBolt.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Contributed by Jonathan Czeck
1010
public class LightningBolt : MonoBehaviour
1111
{
1212
public WanderBehavior target;
13+
public WanderBehavior tether;
1314
public int zigs = 100;
1415
public float speed = 1f;
1516
public float scale = 1f;
@@ -45,6 +46,7 @@ void Start()
4546
vehicles[i].MaxForce = MaxForce;
4647
vehicles[i].PreviousStrength = 0.5f;
4748
vehicles[i].NextStrength = 1.0f;
49+
vehicles[i].MaxDistance = 0.25f;
4850

4951
if (i < particles.Length - 1)
5052
{
@@ -55,7 +57,10 @@ void Start()
5557
{
5658
vehicles[i].Next = target.Wanderer;
5759
}
58-
60+
}
61+
if (tether != null)
62+
{
63+
vehicles[0].Previous = tether.Wanderer;
5964
}
6065
}
6166

Library/BuildSettings.asset

0 Bytes
Binary file not shown.

Library/EditorBuildSettings.asset

32 Bytes
Binary file not shown.

Library/MonoManager.asset

0 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
387 Bytes
Binary file not shown.

Library/assetDatabase3

0 Bytes
Binary file not shown.
152 Bytes
Binary file not shown.
104 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-16 Bytes
Binary file not shown.
-8 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)