Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

NullReferenceException on second line but not first?

$
0
0
Hi, I'm running this code:function Update () { if (Active){ transform.rotation = Quaternion.Slerp(transform.rotation, Target.rotation, Time.deltaTime * Smooth); transform.location = Vector3.Slerp(transform.location, Target.location, Time.deltaTime * Smooth); } } I get a NullReferenceException on the second line (transform.location...) but not the first (transform.rotation...). Why? Why am I getting an exception at all, the lines are basically identical? Also, this site is crap. Third time I'm retyping this post trying to get it to submit.

Viewing all articles
Browse latest Browse all 1875

Trending Articles