Hello,
so I wrote a code yesterday. And today I can’t find out how did i made my algorithm work. There is one line in my code which confused me… it is 4 a.m. right now and i still don’t know what does that mean. Can you help me please?
if (coll.gameObject.transform.position.y + coll.transform.lossyScale.y / 2 < rg.position.y && coll.gameObject.transform)//norm jump
{
return true;
}
coll.gameObject.transform
… (coll is Collide) … it is not boolean, is it? Why does this work and, that’s even worse, why is my algorithm aboslutelly messed up if I remove this line?
Thank you.