|
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
(comments are locked)
|
|
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
(comments are locked)
|
