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"

Spawn a DM and destroy the actor

Hello, Unreal!

Today I was trying to set up a mechanism in the level blueprint where when a certain actor hits a box collision, the hit will spawn a destructible mesh version of the cube at the location of the hit, and then destroy the cube.

alt text

So as you can see, the trigger box casts to the box blueprint to spawn the destructible mesh actor at the location of the hit, and then destroy the original cube. Right now, the box is passing harmlessly through the laser/box collision without any errors reported. I've checked the box's collision and it is set to physics actor, so... What's going on?

Level: alt text

Product Version: UE 4.13
bpq.png (121.4 kB)
lvq.png (541.6 kB)
more ▼

asked Feb 09 '17 at 03:41 AM in Blueprint Scripting

avatar image

1 2 3

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

OK! I solved my problem, and no I will not be one of "those" threads, I will tell you how I solved it.

Instead of arranging the blueprint as above, I used this: alt text

Now, this will create the destructable mesh at the center of the trigger box, so I will be creating several trigger boxes so it looks as realistic as possible when spawning the dm. But later on in the final stages I will go back and go through the extensive process of doing it the "correct way", however that may be.

I will accept this answer as correct, though if you know a more precise way to do this, please comment/contact me.

capture.png (94.6 kB)
more ▼

answered Feb 09 '17 at 10:13 PM

avatar image

1 2 3

(comments are locked)
10|2000 characters needed characters left

Best suggestion I have is check the collision settings on both the laser and the cube, make sure they are actually set to block each other (perhaps even try custom). Did you try a PrintString to see if your OnHit event is being called at all? Im going to assume its not if the laser is passing through.

more ▼

answered Feb 09 '17 at 04:50 AM

avatar image

963 37 11 37

avatar image MerkyTV Feb 09 '17 at 09:47 PM

Thank you for your response. Yes, I did try to print string when the box collides. Also I would like to add, the box is colliding with a box collision, not the particle itself. The collision for the box is set to physics actor and the box collision naturally hits any actor that collides with it.

-edit- I also found that the box will print a text or string when I set the event to be ActorBeginOverlap instead of OnActorHit

(comments are locked)
10|2000 characters needed characters left
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