1
\$\begingroup\$

so I have a game in progress that is very similar to Asteroids. I was using spheres as primitive game objects and it all works perfectly in this case, but I need to be able to rotate the ship's model, and move the sphere as seperate entities and so I decided to keep the sphere for the positioning (but with no mesh renderer on it, just the sphere collider). And then as a child of that sphere is my model of a spaceship. It all works fine, ie. the ship rotation is completely seperate to that of the position of its parent sphere.

My problem is when I added the OnTriggerEnter to test collision between Ship to Asteroid. It would trigger immediately.

So I looked further into it, I zoomed right out on the Unity editor and could see that there is a huge collider that appears to be part of the mesh. (Now the mesh i did download from Blend Swap, but I have tried 3 varied ships and they have all done it - not to mention that I pulled them into Blender first and editted them so that it was just the ship part that I wanted and when I exported the OBJ/FBX's I ticked the box "Selected Only", - In a nutshell - I'm 110% sure there wasnt some little camera/light/object floating around that would cause the model to have such a big collider)

Secondly , I think I mentioned already, that in Inspector THERE ISNT ANY COLLIDER supposed to be attached to the mesh/model.

Heres a screenshot which I hope shows what I mean.

alt text

I really hope there is a way to fix/remove this as its been stopping me progressing any further and if it cant be removed I will have to start the whole game from scratch again.

Really I am also asking, why is there a collider even there when as you can see in the screenshot it clearly doesnt have any collider added. The parent has a collider, but this is the correct size and I can adjust/deactivate it as I'd expect. In my mind this collider pictured shouldnt exist. why this collider here

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

Well that collider might not even belong to the game object you are currently selecting, try to go through each game object that is a child object and you'd probably find it. And when you do you can remove it by right clicking the component and clicking "Remove Component". If it still doesn't work send me the project file cuz I can't make out what is what just from looking at the picture.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks dude. I thought I had done that, but it turns out the Afterburner created the collider and I somehow missed it. I think my brain was just like, nah i cant possibly be that, why would the afterburner prefab have a massive great sphere collider that isnt even a trigger. But I removed the afterburner and it now works great. \$\endgroup\$ Nov 13, 2017 at 13:39
  • 1
    \$\begingroup\$ glad i helped lol \$\endgroup\$ Nov 13, 2017 at 13:40
  • \$\begingroup\$ me too my man. I can accep the answer in a few mins \$\endgroup\$ Nov 13, 2017 at 13:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .