Search Unity

Placing "fake" hole prefabs in 3D level

Discussion in 'Scripting' started by patrickk2, Jan 25, 2020.

  1. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello everyone!

    I hope this forum is appropriate for my question, if not I would appreciate any pointers to better suiting forums.

    I am currently working on a 3D ball run game, and during level design I would like to be able to just place "(fake) hole" prefabs on the ground, instead of creating ground elements with actual holes in their meshes (mainly because the latter process would be way to time consuming, considering that there will be lots of holes).

    Is there a way to make it look like the ball falls though such a fake whole (the camera position would be fixed if that helps)? Unfortunatelly I am not sure where to start attacking this issue, so any ideas on how to do this or pointers to similar behaviour which could be adapted for my case would be greatly appreciated.

    Thanks in advance for any input you guys have on this issue!

    Best regards,
    Patrick

    P.S.: Sorry for the cross post, I am really not sure where this would fit best.
     
  2. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583


    Is this the sort of thing you're thinking of?
     
    patrickk2 likes this.
  3. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello @Lethn!

    Thank you for the quick response! Yes, this looks very promising, at the looks of the holes (and that you can move them). He says himself in the video that you still need a way to handle things falling into those "holes". If anyone has an idea about this, I would be really grateful.

    Thanks again for the video, that took me a big step in the right direction.

    Best regards,
    Patrick
     
  4. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583


    Found a more detailed tutorial on the actual technique I think, let me know if this helps you, if you're looking to make actual geometric holes it might be a better idea to design your levels in blender and import the meshes.

    Blender has really useful features for drilling holes into meshes exactly like this.

     
  5. patrickk2

    patrickk2

    Joined:
    Dec 8, 2019
    Posts:
    92
    Hello @Lethn!

    Thank you so much for the link to the video! And I appologize for my delayed reply.

    Yes, this is exactly what I am trying to acomplish. And I also appreciate the Blender video, but I prefer the method from the other video, because it seems to me, that this will facilitate level design more.

    Thank you again for the hints, this really helped me a lot!

    Best regards,
    Patrick
     
  6. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    No problem, I put the blender tutorial in anyway because if you're dealing with static levels that's probably an easier option if you're wanting to do everything in runtime the fake holes are probably your best bet from what I can see.