x


Rigid Body - Multiple Colliders

Hello all,

I'm building a simulation. I have several AI controlled game objects. They don't notice each other unless they have rigidbodies.

I am using a sphere collider to act as a trigger for things like sight. However, I have to turn gravity off, otherwise they fall through the floor.

I would like them to follow the contours of the ground. I've been reading, and I think I can just use a child object and apply a sphere collider to it, and have a box collider on my cube which would allow me to turn gravity on again. The ontriggerenter would have to pass a message up to the parent object.

Can someone direct me to how to use child objects? I'm a bit new to Unity, I haven't found them yet. Is a child object just a game object instantiated with a script attached to another game object?

Would my idea for colliders work?

Thanks, Matt

more ▼

asked Jan 31 '11 at 06:11 AM

MattG gravatar image

MattG
2 1 1 4

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

1 answer: sort voted first

It would work yes

All you do is make a new object, and drag it (in the scene hierachy) onto the one you want as parent, it'll add it as a child object to it

more ▼

answered Jan 31 '11 at 06:16 AM

Mike 3 gravatar image

Mike 3
30.5k 10 65 253

(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:

x1790
x1693
x410

asked: Jan 31 '11 at 06:11 AM

Seen: 1062 times

Last Updated: Jan 31 '11 at 06:11 AM