Hi all,
quick question, that got me frustrated a little. My first thought when making the “camera follows ball” challenge was just like Ben did, I thought myself i have the ball, calculate the fix offset in Start() and then calculate each frame the new position, since the update will automatically have the new ball position.
It didn’t work, and by logging out the ball transform it showed that the update did not recalculate the transform of the ball, it sticked to it’s initial starting position, even though the ball was moving
After some trying around, i followed the old pattern and added
ball = GameObject.FindObjectOfType<Ball>();
into the Start() method, and now it works for me too.
Why is that ? I have the “public Ball ball” Variable set at the script beginning just like Ben has.
Is this maybe a version issue ? I wanted to switch to Unity 2017 with the following 3 classes, but accidently made the BowlMaster in unity 5.5.4p4. What is Ben using for his lessons ? Was Unity 2017 even out when recording ?
I want to know that, so that I can better understand how to deal with objects in scripts.
Thanks for helping
(edit) I know that at the start of the lesson there was a hint to use unity 5.6 or higher, I thought I have the newest version since “update” always told me my inspector is up to date… Just found the unity 5.6.5 version, trying that now…