Can I use subtractive shapes?
Hi I'm pretty new to unity and I'm trying to make a circular hole in a stock 3D cube that I've stretched into a rectangle. The idea is to make a hole that passes through it so that a sphere could drop through.
I was thinking if I could somehow use the 3D cylinder shape to subtract from the mesh renderer and collider of the cube it would work that way. By this I mean placing the cylinder inside the cube so that it creates a circular space through it from top to bottom, allowing my rigid body cylinder to pass through the cube.
Sorry if I've posed this in a poor way, if I have please tell me and I'll try explain it further best I can.
Thanks in advance for any assistance.
I've been wondering the same thing and haven't found a way. However I know for a fact that Unreal Engine has subtractive objects so you can make holes in things. It's how I made the doorways in the houses I made. I want to do the same thing in Unity but I can't seem to figure it out.
Answer by tanoshimi · Aug 11, 2015 at 12:50 PM
Unity is a game engine - to create the 3d assets for use in the game, you should use modelling software (Blender should let you create the shape you describe pretty trivially)
I'd downvote you if I could. Unreal Engine is a game engine (a better one) and you can use subtractive brushing. It allowed me to create nearly anything I wanted, incredibly trivially, and without needing a second program. It was quick and simple.
But read the question. This OP didn't know that all game engines (including UnReal) expect you to import 3D models. That's why they checked it as their answer.
You can search for info on how to simulate Unreal subtractive prototyping in Unity, or ask a new Q about it (and you might get better answers if you leave out the commentary.)
Answer by Sir_Starshine · Apr 23, 2016 at 10:47 AM
@Tom212 I don't think the other users here know what you were talking about, but I do. I had a similar idea around the same time, but I never found much help. Even the Instant Mask addon didn't help, as I couldn't get it to function (at the time, at least, I haven't been able to test it out again lately).
Honestly, I think your best bet would be to use a different game engine, like UE4. I know it supports subtractive meshes.
Answer by WarmBiscuit · May 20, 2017 at 08:52 AM
I've been wondering the same thing and haven't found a way. However I know for a fact that Unreal Engine has subtractive objects so you can make holes in things. It's how I made the doorways in the houses I made. I want to do the same thing in Unity but I can't seem to figure it out.
Answer by Owen-Reynolds · Aug 11, 2015 at 07:06 PM
Subtractive colliders don't exist. There's isn't going to be any way to make 2 Unity colliders and have one "subtract" from the other. If you learn more about how colliders are different from models and how they work, you'll see why.
If you happen to have a model made with subtraction, it's just a regular model -- vets and faces like anything else -- and you can tell Unity to use it as a collider. But any of the concave parts (which is what subtraction is used for) often work funny, so it's the same problem.
Making efficient oddly-shaped colliders is somewhat of an art.
Your answer
Follow this Question
Related Questions
Adding 2D Shapes 2 Answers
Looking for an approach to modify 3D shapes in run time 0 Answers
Draw simple 2D shapes like circles, rectangles, paths etc... 0 Answers
Particle Effect Shape doesn't work 1 Answer
How can I do this? Any Ideas? 1 Answer