Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How can I make a hole in an object with Unity 3D? I've something like this object and I want to make a hole in it.

share|improve this question
2  
Do you wish to make the hole in the editor or during gameplay? Unity does not have a built-in feature for the former, nor an easy function for the later. However, both can be achieved via code. – MAnd yesterday
    
Do you want any old random hole in it or a distinct predefined hole at a specific location? – Steven yesterday
up vote 3 down vote accepted

You can't. Unity does not have CSG modeling options. You're going to either:

  1. construct your cylinder out of smaller parts
  2. model it in another program
  3. programmatically rebuild the mesh geometry at runtime. WARNING: ADVANCED TOPIC
share|improve this answer
    
In the advanced topic helm, there is also the option of coding a script to add that function to the editor. – MAnd yesterday
    
@MAnd true enough, and I've used one such tool. It was a pain in the arse to use (at least, the free version, which lacked a number of features). I'd categorize that as an "advanced topic" even within the advanced topic. – Draco18s yesterday

Not directly. But there are several ways to achieve this:

  1. Use a voxel engine. Then you can have objects that has some kind of "molecules". You can deform them in runtime.

  2. This plugin from the asset store in Unity.

  3. You may build your object in parts, and then attach them together in Unity, so you can create a hole by simply removing the part in the middle.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.