Hello i Have that kind of code:
void Start ()
{
Vector3 KierunkeStrzaluTmp = new Vector3(1,0,0);
tWektorStrzalu[0] = KierunkeStrzaluTmp;
KierunkeStrzaluTmp = new Vector3(1,-1,0);
tWektorStrzalu[1] = KierunkeStrzaluTmp;
KierunkeStrzaluTmp = new Vector3(1,1,0);
tWektorStrzalu[2] = KierunkeStrzaluTmp;
}
// Update is called once per frame
void Update ()
{
//Sposob w jaki porusza sie naboj
float ruch = szybkoscNaboju * Time.deltaTime;
transform.Translate(tWektorStrzalu[0] * ruch);
(of course there is more but here is problem:))
and that error:
Assets/_Skrypty/Naboje.cs(11,56): error CS0029: Cannot implicitly convert type UnityEngine.Vector3[ ]' to UnityEngine.Vector3’
I don’t know why Unity can’t handle with array of Vector 3 when Vector 3 as variable it don’t have. I need to use array or vector or something like that. I start with array but i counter this and don’t know why engine is calling this error. Please help ( i’m writing in C#)