x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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.

Product Version: Not Selected
Tags:
more ▼

asked Apr 23 '15 at 03:36 PM in Blueprint Scripting

avatar image

VoidGoat
162 24 29 34

avatar image spyro Apr 23 '15 at 04:17 PM

Hmm, sounds indeed as a perfect match for BSP...

Maybe you could use a translucent material and set the alpha to 0 on the right place through a dynamic material or something..?

avatar image VoidGoat Apr 23 '15 at 04:36 PM

I need to be able to move my character through the hole as well

avatar image sorfos Aug 31 '17 at 01:18 PM

Hi, when i press the button instead of creating a hole, I create a mesh ...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi VoidGoat,

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. alt text

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. alt text

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:

https://wiki.unrealengine.com/Location_Based_Opacity_in_UE4_-_Part_1

holebp.png (130.3 kB)
spawn_hole.png (215.6 kB)
more ▼

answered Apr 23 '15 at 06:35 PM

avatar image VoidGoat Apr 23 '15 at 07:50 PM

wow thank you! I'll try and set this up and check out the location based opacity.

avatar image VoidGoat Apr 23 '15 at 09:01 PM

what parameters should the HoleThrough collision channel have?

avatar image VoidGoat Apr 23 '15 at 09:02 PM

and do you need to make a preset?

avatar image Adam Davis STAFF Apr 23 '15 at 09:04 PM

I set the collision to initially block all so that it works as if the wall was a traditional wall. The collision setup should be set on any object you want the "hole" to affect. To do this, go to the details pane>Collision and select custom, then set the object dropdown menu to your collision object.

avatar image VoidGoat Apr 24 '15 at 01:53 AM

Woo! I finally got it working. thanks for your help

avatar image PanicLiquid8or Nov 15 '15 at 09:27 AM

This link is a possible way to make a hole visually appear.

avatar image Adam Davis STAFF Nov 16 '15 at 04:06 PM

That is one way to do it. The problem you will have to account for is the internal portion of an asset. The opacity does create a hole, however if a player turns sideways within the asset they'll be able to see directly out of it due to hollow interiors, etc. Additional math will be needed to "cut" a hole and create a material that shows through the object, of which I unfortunately don't have information on at present.

avatar image PanicLiquid8or Nov 17 '15 at 12:40 PM

Exactly, I tried some addition and subtraction in the editor to find and intersection between the negative and positive mask, but I didn't fare well with it... But now I would use a static mesh to hide it. It's easy for me because I'm just making holes in a floor, so the same static mesh can be used, only diff texture coordinates. Is there a way to make multiple holes like this,? Visually I mean?

avatar image Adam Davis STAFF Nov 18 '15 at 02:32 PM

While I'm certain you can, I unfortunately do not know how one would do that. Perhaps getting a radius around the hit location and applying the opacity that way? Or potentially using a decal over the area?

avatar image Sir Quizalot Oct 09 '16 at 03:48 AM

Is the channel still called hole through?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Alternatively, wouldn't it be easier to just have separate collision spheres/cubes for walls. Then, disable them and alpha out material during runtime.

more ▼

answered Oct 09 '16 at 03:49 AM

avatar image

Sir Quizalot
47 3 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

what is the holeinwall class?

more ▼

answered Mar 19 '18 at 07:18 PM

avatar image

anhianhi88
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question