- Home /
Question by
Jcoaster2008 · Jan 24, 2012 at 05:39 AM ·
camerarigidbodyjoints
Null Reference Error with Configurable Joint
I have a configurable joint component on my main camera. I'm trying to attach the configurable join to an object when the player clicks it. But, I keep getting a Null Reference Error in this line of the script
Camera.main.gameObject.configurableJoint.connectedBody = hit.collider.gameObject.Rigidbody;
I don't think I'm assigning the connected Body correctly, but I can't find anything that explains how to do this correctly. (And yes, the other object does have a rigidbody.)
Comment