::Instead of a knife i made an arrow, it has the same orientation as the knife (pointed to top right)
and even when i change the prefab to be -45, it still comes out pointed to the top right, i’ve tried it with other prefabs and they all do the same thing.
please help, here’s my Arrow (knife) Controller code requested by Terresquall
the code is a 1 to 1 of the KnifeController code, but i just replaced all the words with knife with arrow, the code seems to work.
using UnityEngine;
public class ArrowController : WeaponController
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
protected override void Start()
{
base.Start();
}
protected override void Attack()
{
base.Attack();
GameObject spawnedArrow = Instantiate(prefab, transform.position, Quaternion.identity);
// Set the position of the spawned arrow to the position of the weapon
spawnedArrow.transform.position = transform.position;
spawnedArrow.GetComponent<ArrowBehaviour>().DirectionChecker(pm.moveDir);
}
}
View post on imgur.com