How to make hole in wall in real time
I need to make a hole in a wall in real time and cannot figure out how to do it. I tried to use BSP geometry but this can't be used in real time with blueprints. If anyone knows how to do this your help would be greatly appreciated.
asked Apr 23 '15 at 03:36 PM in Blueprint Scripting
Unfortunately collision is baked in when you play the game. However, there are ways to create something similar to what you are attempting to accomplish. I'm attaching two images, the first is a "hole" blueprint that is simply a box or sphere collision. You will need to create a custom object collision channel in Project Settings>Collision for this setup to work.
The second image is the player character spawning the object into place. It does a line trace from the camera to the location, searching specifically for objects with the collision type , if it finds one it creates a hole in the direction the player is facing. You can change this to a direct hole by using impact normal as opposed to hit location.
The only thing this setup doesn't quite do yet is mask the mesh material to create a "hole". I think location based opacity will work, however I have not tested this on my end yet. If you would like to learn more in the meantime there is a fantastic tutorial on location based opacity here:
answered Apr 23 '15 at 06:35 PM
Alternatively, wouldn't it be easier to just have separate collision spheres/cubes for walls. Then, disable them and alpha out material during runtime.
answered Oct 09 '16 at 03:49 AM
what is the holeinwall class?
answered Mar 19 '18 at 07:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here