Show us what you got! What did you come up with for your projectile trails? Something wild and crazy I hope.
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.
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)
{
other.GetComponent<Health>().TakeDamage(damage);
if (speedModifier)
{
other.GetComponent<Fighter>().ReceiveFreeze(3f, speedSlow);
}
Destroy(gameObject);
}
Destroy(gameObject, 10);
}
Fighter.cs Added:
private Coroutine freezeCoroutine = null;
public void ReceiveFreeze(float duration, float speedSlow)
{
if (freezeCoroutine != null)
{
StopCoroutine(freezeCoroutine);
}
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;
}
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.