- Home /
Is it possible to scale one face of a box collider??
I'm assuming that box colliders have vertices to represent their position and size. I was wondering if you could somehow get the faces and their corresponding verts and scale them?? I'm trying to make the collider better represent the bow of a ship. If I can't resize the faces of the box collider, then I may as well use a mesh collider, but since it is expensive, I would prefer not to.
Thanks in advance
Answer by Owen-Reynolds · Feb 23, 2014 at 08:36 PM
" box colliders have vertices to represent their position and size." No. The built-in colliders aren't just pre-made mesh colliders.
Perfect 90 degree boxes (and spheres and capsules) have fast mathematical ways of collision testing. For a box, you orient to local coords from the center, then do a (fast) check x,y,z are all less than the size. If the box has a slantwise face, that method won't work.
That's why Unity has no build-in cylinder collider. There just isn't a fast math trick to check it.
fair enough. I figured it wasn't possible or unity would have had a means of finding it through the documentation
Answer by joshieerawr · Feb 23, 2014 at 10:12 PM
create the shape in 3D package and add a mesh collider, i don`t know if you can in Pro-builder v.2
Like I said, That's what I'm going to have to resort to since there isn't a way to do it with the primitive
If you've never, ever made a 3D model, it's going to be a huge pain. But otherwise, in free Blender, can easily click new Cube, select and pull one edge up a bit, then export as FBX (and save the blender file, just in case.) A few $$anonymous$$utes.
Or, using primitives, could probably stack a tilted thin box over a box to get about the same shape (the thick side won't be flat, but pretty close.)