Funky Projectile Trails In The RPG

Show us what you got! What did you come up with for your projectile trails? Something wild and crazy I hope. :slight_smile:

I decided not to color the trail as much, decrease size, shape, and adjust the alpha on the color. I figured the end result was satisfying.



I tried changing the trail colour gradient on the variant assets but it kept getting propagated to the parent prefab. I went with @Sovereign’s approach, as I think this is a bug in Unity 2019.1.7.

Can anyone please verify this? You may use the ReproProjectWizard, and submit a bug as per Unity’s official QA guidelines.

my arrows with realistic speed and 60ft (18.288 m range.

1 Like

I made it so that upon the blue/ice arrow hitting, the player/enemy is slowed for a short time. Probably did it very inefficiently so feedback always appreciated -

Projectile.cs Added:

[SerializeField] bool speedModifier = false;
[SerializeField] private float speedSlow = 3;

private void OnTriggerEnter(Collider other)
			if (other.GetComponent<Health>() == target)
				if (speedModifier)
					other.GetComponent<Fighter>().ReceiveFreeze(3f, speedSlow);
			Destroy(gameObject, 10);

Fighter.cs Added:

private Coroutine freezeCoroutine = null;

public void ReceiveFreeze(float duration, float speedSlow)
			if (freezeCoroutine != null)
			freezeCoroutine = StartCoroutine(IReceiveFreeze(duration, speedSlow));
		private IEnumerator IReceiveFreeze(float duration, float speedSlow)
			GetComponent<NavMeshAgent>().speed = speedSlow;
			yield return new WaitForSeconds(duration);
			GetComponent<NavMeshAgent>().speed = GetComponent<Mover>().baseSpeed;

Mover.cs Added:

[SerializeField] public float baseSpeed = 5;

private void Awake()
			navMeshAgent = GetComponent<NavMeshAgent>();
			health = GetComponent<Health>();
			navMeshAgent.speed = baseSpeed;
1 Like

Finished #2 part in simple weapons

Basic Weapon pickup and drop system

I hope you guys cover the drag and drop system.
also to store the picked up weapons.


Well done!
Drag and Drop and storing collected inventory are covered in the next course, RPG Inventory Systems.


Shared this in the wrong spot at first lol. Went for holy arrow, ended up with lightning

Hello, very nice :stuck_out_tongue:

Can you give us hint in how you did this please ? Especially the trail ! I tried playing with the width but i can quite achieve that neat look.

Thanks !

I would think one would do that kind of trails with using a VFX Graph…

Privacy & Terms