x


Generate BoxCollider with Rigidbody from c# script - how to?

Could someone maybe tell me how to generate a Box Collider with a specific size from a C# script. Since you can't new the Box Collider because its a Component how do you approach it?

more ▼

asked May 26 '11 at 06:46 AM

looak gravatar image

looak
1 6 6 8

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

1 answer: sort voted first

You use gameObject.AddComponent() to add components.

You can change the size after its added.

more ▼

answered May 26 '11 at 07:16 AM

hellcats gravatar image

hellcats
651 8 12 23

(comments are locked)
10|3000 characters needed characters left
Your answer
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:

x4165
x81

asked: May 26 '11 at 06:46 AM

Seen: 1686 times

Last Updated: May 26 '11 at 07:17 AM