Hi!
I’m trying to add some flair to my combat system by adding a particle effect whenever a weapon hits an enemy. The thing I’m running into is that particle effect is not spawning at the current location of the weapon. It keeps spawning at the same location outside of my level.
I’m using this script to test it out:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WeaponEffects : MonoBehaviour
{
public GameObject effect; //This is the effect that plays on weapon.
// Update is called once per frame
private void Start()
{
Debug.Log("Trigger Effect");
Instantiate(effect, transform.position, Quaternion.identity); //This is the effect when weapon hits an enemy.
}
}
Could anyone help me out?
Kind Regards