Just curious, is it any more expensive to model a box around an object in maya and use that box as the collision mesh as opposed to building a box collider directly in Unity?
Yes, if you use a box that you model as a collider, it will have to be a mesh collider. Even though the shape is the same, a box collider vs. a mesh collider has optimizations to make it faster.
–Eric
Noted. Thanks
another trick i use is to setup a series of box primitives in my modeler around the various mesh shapes. then bring that in and run a little editor script that converts all those little boxes into box colliders (deletes mesh renderers etc) and sets them up as a compound collider. As positioning boxes in your modeler is still a lot easier to do then in Unity.
Cheers.
Correct me if Im wrong but is that a mistype? He can make a box externally and import it> add a box collider, and its the same as creating a unity cube, isnt it?
My point is that he’s not bound to using a mesh collider, as far as I know, but you might want to comment Eric.
Thanks
Aaron
of course you can. but if your mesh you modeled isn’t a box, sphere or capsule in shape then it needs to be a mesh collider if it is really important for the collider to be exactly that shape.
Cheers.
Nope, read the original question again. Is it more expensive to model a box and use that as the collision mesh, as opposed to using a box collider in Unity, yes. If you want to model a box and use a box collider for it, that’s fine too. The main point being that you want to use a box collider as opposed to a mesh collider, where feasible.
–Eric
Yeah ok, Im just not seeing it the same way you guys are. But thats ok. One of our foster greyhounds kept me up all night cause he had his balls cut off at the vets, and he was a bit sore, so I guess Im just not with it today. Dog seems fine lol.
AC
And the award for the most interesting, and slightly disturbing reason for misreading a thread subject goes to… opens envelope…AC!
Congrats!
If any other pets of yours get bits of their genitals removed, feel free to not tell us about it!
Seriously though, that’s never fun. I am talking about staying up with a pet that has had surgery, and not about getting bits of your genitalia removed. although the same applies both ways really…
We have been through all sorts of fun with our dogs too. Hopefully the dog is doing ok now?
-Jeremy
Yep Thanks Jeremy, just trying to keep it in context! I love greyhounds, its a sad life if no-one gives them a home…
You guys are great too!
Back to , er what was it, oh yes, collision meshes!
Peace guys.
AaronC
Now that’s a very clever and useful idea! I’ll have to try and write a similar script…
I don’t suppose you could share that script? I just finished placing boxes around my scene and had no idea just how many I really had. 867 boxes would take a long time to import, apply colliders, delete mesh components, and combine
Indeed. More homes to people - especially unity users. Or we’ll have sad, sad lives.