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"

Destructible mesh loses collision and physics after packaging in 4.18.2

I have a helmet mesh in my game that is rigged as a destructible mesh so it can explode in a bloody mess. This has always worked fine. After upgrading to 4.18.2, however, the destructible mesh gets no physics or collisions in the packaged build! It works fine in-editor. You can see what I'm talking about in this video: https://youtu.be/KUA88XnZlY0

As you can see, other destructible meshes are working as expected. It seems to only be the space soldier helmet that has this issue... which of course is the only one I actually need.

This question seems to detail the same issue. Thinking it might be a case of migrated files breaking, I deleted all the old files used for the space helmet, re imported the mesh, recreated the destructible mesh, stuck the destructible mesh back in my custom blueprint, and repackaged... same results.

Why in the world would some destructibles work fine and others break?

Product Version: UE 4.18
Tags:
more ▼

asked Dec 14 '17 at 06:45 PM in Bug Reports

avatar image

SlimeQ
332 10 21 38

avatar image Jeff A ♦♦ STAFF Dec 15 '17 at 03:07 PM

Hi SlimeQ,

I was unable to reproduce this in a fresh project that I created. Is there any chance that you can provide a sample project that just contains the assets causing issues when packaged.

Also have you tried creating a brand new project in 4.18 and adding in the assets. I would be curious if this was only happening when upgrading a project.

Thank you.

avatar image SlimeQ Dec 19 '17 at 06:03 PM

I'm not sure I can provide a sample project with the asset as it's derived from a marketplace asset. I can almost guarantee this is caused by upgrading the project but it is NOT caused by the actual asset being upgraded.

The asset does have a two sided material, I suppose this could be a factor.

avatar image Jeff A ♦♦ STAFF Dec 19 '17 at 04:47 PM

I am marking this as answered for now due to not being able to reproduce the issue and a lack of response. If you are still experiencing this issue and would like to reopen please feel free to comment.

avatar image SlimeQ Dec 19 '17 at 06:01 PM

Yes I am still experiencing this issue, I've only had 1 workday in which to reproduce it

avatar image Jeff A ♦♦ STAFF Dec 20 '17 at 07:22 PM

Yes something did change in 4.18. First it was changed to now be a plugin that is not enabled by default. So you will have to navigate to your plugins and search for "Apex Destruction" and enable that. Once it is enabled when you right click on a mesh you will have the option to create a Destructible Mesh. I have added a screenshot for clarity.alt text

capture.png (82.8 kB)
avatar image SlimeQ Dec 20 '17 at 09:07 PM

Did that, see above comments

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

3 answers: sort voted first

I actually found a workaround for this issue. It is critical that the destructible mesh not be referenced is not referenced (even indirectly) by a character or other "startup asset" as detailed in this other post. Since this makes it impossible to keep a proper reference, I'm instead keeping a FString reference and then loading it when it's needed using StaticLoadClass like so:

 UClass* Result = StaticLoadClass(UObject::StaticClass(), nullptr, *ClassName, nullptr, LOAD_None, nullptr);


more ▼

answered Feb 08 '18 at 10:03 PM

avatar image

SlimeQ
332 10 21 38

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

Hello, I have created a ticket for this issue. you can follow it here at: 54133

more ▼

answered Jan 17 '18 at 03:58 PM

avatar image

Jeff A ♦♦ STAFF
3.3k 2 5 7

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

If that is the case have you attempted to create a fresh 4.18 project and import the asset?

Edit: Marking this as answered now that it is working fine when packaged from the new project.

more ▼

answered Dec 19 '17 at 06:45 PM

avatar image

Jeff A ♦♦ STAFF
3.3k 2 5 7

avatar image SlimeQ Dec 20 '17 at 07:14 PM

I'm doing it now. One weird thing I've noticed is that the "Create Destructible Mesh" option is missing from the context menu:

alt text

In my normal (upgraded) project, it's right here:

alt text

Did something change in 4.18 with regards to destructible mesh creation?

EDIT: Nevermind, just had to enable the ApexDestructible plugin

avatar image SlimeQ Dec 20 '17 at 07:39 PM

Okay, just confirmed the asset works fine in a clean 4.18 C++ FPS template. Now to try an upgraded project

avatar image SlimeQ Dec 20 '17 at 09:06 PM
  1. Created FPS Template 4.17

  2. Upgraded to 4.18

  3. Added mesh

  4. Created destructible mesh

  5. Added apply radial damage on Enter key to character

  6. Packaged

  7. Tested

works just fine, unfortunately

avatar image SlimeQ Jan 02 '18 at 08:10 PM

Just an update. The issue seems to have something to do with the reference to my custom actor class. I have a C++ class which extends ADestructibleActor that I spawn on character death. There is one particular instance that I use for all characters which seems to be causing the issue. ANY destructible mesh that I set on that actor breaks, and ALL instances of that destructible mesh (meaning ones not associated with the actor at all) exhibit the behavior I showed before in the packaged app.

Figuring this would be an easy fix, I made a new actor and used the "Replace References" function to replace references to the old one with the new one. This actually just made the problem much worse. Now the destructible mesh is STILL broken, presumably because it was set in the destructible actor I deleted and now, since it's deleted, I can't clear the variable to reset things.

avatar image SlimeQ Jan 02 '18 at 09:48 PM

Another update.

I managed to recreate the actor in a way where it actually works in my packaged build when placed on a map. HOWEVER, I still get the error behavior when the actor is spawned into the scene at runtime. I think it's safe to conclude that this has something to do with whatever code in UDestructibleActor that has changed in 4.18, perhaps the constructor or something

avatar image SlimeQ Jan 02 '18 at 10:34 PM

Yet another update.

I think I've got it. I found that in the code for my destructible actor class that I was using GENERATED_BODY() instead of GENERATED_UCLASS_BODY(). Why? My guess is that I pulled that from the old DestructibleActor code. So I switched that over, added an empty constructor (wouldn't compile without it), made all existing properties public (which is not the default when using GENERATED_UCLASS_BODY) and created a new blueprint with the class and now everything seems to be working correctly in the packaged build.

EDIT: Spoke too soon; the error was back in the next package. On the right track though.

avatar image SlimeQ Jan 03 '18 at 04:31 AM

It gets weirder. The actor (and all destructible meshes of the instance used in the actor) stops working as soon as it's referenced by one of my characters. If none of those characters reference the actor, the destructible actor works fine again. I know at least 2/3 characters were migrated, though I'm not sure about the 3rd. More research needed

avatar image SlimeQ Jan 03 '18 at 12:54 PM

Another update.

I ran a test where I basically just made a default blueprint of my bot class and it was the only actor referencing the destructible actor. This worked.

So, I made a new blueprint for my player character, migrated over all the important values, removed all destructible actor references from the old characters, packaged, and tested. In this configuration, the destructible mesh was once again BROKEN. Removed references from both characters, and the mesh was fixed. Tried 2 builds with only 1 of the 2 characters having the reference and it was broken again.

avatar image SlimeQ Jan 14 '18 at 04:42 AM

Hello Jeff A,

I have not heard from you in well over 10 days so I must assume you aren't reading, but I have managed to recreate this bug in a fresh project. Here are the steps to reproduce:

  1. Start with C++ FPS template

  2. Create a C++ class which extends ADestructibleActor

  3. Create a DestructibleMesh from some static mesh (I used a sphere)

  4. Create a Blueprint based on that C++ class and assign your DestructibleMesh

  5. Create some actor (in blueprints) which you can trigger to spawn the Blueprinted mesh actor. I just used a sphere and on overlap with a player I spawn an actor by class.

  6. In the C++ code for your character, add a UPROPERTY like so:

    UPROPERTY(Category = Destructible, EditAnywhere) TSubclassOf DestructibleActorRef;

  7. Compile

  8. In your character blueprint, set DestructibleActorRef to your blueprinted mesh actor.

  9. Package

  10. Test

For whatever reason, this sequence of events breaks ALL instances of the blueprint. Your blueprinted mesh actor will spawn but will not have any collision or physics enabled.

For reference I have created a project with the bug present, you can download it here: https://drive.google.com/file/d/1OHcYUAMeN6LP4iBv2sJFAnK1XRdgYYDC/view?usp=sharing

Pressing enter will trigger radial damage, so to test the destructible mesh behavior you just have to walk into the blue sphere to spawn a destructible sphere and then stand near it and press enter to destroy it. This will work fine in editor, but will break in a packaged build. If you clear the value for DestructibleActorRef in the character blueprint and package, destruction will work fine.

avatar image Jeff A ♦♦ STAFF Jan 16 '18 at 02:55 PM

Hello,

I apologize for missing your responses.

With your latest comment I was able to reproduce the issue in a clean 4.18 project. Also following the new steps you provided I was able to have this happen in a 4.17 project as well and was just curious if you had the same results as well. Thank you again for the clean and concise reproduction steps and I apologize for taking so long to get back to you.

avatar image SlimeQ Jan 16 '18 at 10:15 PM

Thank you very much.

It's very odd to me that you were able to reproduce in 4.17... It was definitely working in my project before I upgraded. I have not attempted the repro steps in 4.17 yet, but this would seemingly indicate that something else is going on.

Spent a few hours searching for a workaround. Found, interestingly enough, that simply adding a blueprint event to the character that spawns the actor by class also breaks the mesh. Why doesn't this happen when a generic actor bp spawns the actor? Does it have something to do with the character class itself?

(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