x


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.)

more ▼

asked Jan 24 '12 at 05:39 AM

Jcoaster2008 gravatar image

Jcoaster2008
1 1 3

(comments are locked)
10|3000 characters needed characters left

0 answers: sort oldest
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3129
x1864
x107

asked: Jan 24 '12 at 05:39 AM

Seen: 262 times

Last Updated: Jan 24 '12 at 05:39 AM