UE 4.15.1 - Nativize blueprint collision bug - Spawning child of a blueprint loses collision settings

I have a setup where I spawn in actors as pickups for the player, they use collision sphere with physics to drop into the world and collide with the world. When I do a build using Nativization, this physics sphere seems to lose it’s collision settings and falls through the world.This only happen when spawning a child of the base blueprint I created. Spawning the base blueprint seems to work just fine. I found this bug report that may or may not be related to the same problem I’m having, so here’s the link for that just in case there’s overlap there.

… Repro

  1. Using an example project like the Blueprint 3rd Person Example…
  2. Create new blueprint Actor.
  3. Inside this new actor, add a collision sphere and enable physics and I also constrain rotation on all axis and set it to only collide with WorldStatic channel, ignore all other channels.
  4. Now make a child blueprint of this new Actor blueprint. No changes inside the child, keep as is.
  5. Inside the level blueprint on begin play, spawn in the child blueprint.
  6. Finally build the project using Nativization for play test.

When you play test notice the sphere drops through the floor, in stead of colliding with it.

Hello ,

I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker. Please feel free to use the link provided for future updates.

Link: Unreal Engine Issues and Bug Tracker (UE-44333)

Make it a great day

Thanks Rudy, much appreciated!.

I just wanted to add some info here that I just discovered based on another blueprint I use in my project. so with this one, it’s basically for damage, when the enemy does damage to the player, I use a collision sphere to run an overlap event. In this case, it doesn’t lose collision all together, but it changes the channels it can collide with. Basically my enemies end up hitting both themselves and the player. I have some custom channels for both player and enemies for collision, for these occasions so only specific things can overlap of course. So I’m not sure exactly what’s going on there, how the engine assigns these channels, based on what, but it changes from my “Custom” settings to something else.

The reason I mention this is because originally it looked like it loses all collision, but it seems rather to change which channels are affected. I’m sure you guys would see what’s going on there when you look at it, but I just wanted to add this just in case it makes a difference in finding the problem there.

I’m having the same issue and searched for the problem on my side for the whole day. It is really frustrating how painful it is to enable nativization because of all the problems you encounter. And I am having only a relatively small project.

I can’t be 100% sure but I may be having the same issue with some of my collision presets. In editor or stand alone the collision works as I expect and nothing I am using has custom collision. Once I nativize my build a child actor of mine seems to ignore its collision presets and instead use the default collision of its object type.

I encountered the same issue when nativizing our project in 4.16.1. I investigated a bit and it seems that collision presets are not set correctly for nativized blueprint components. If I ask GetCollisionProfileName for the affected component, it reports correct name, but GetCollisionResponseToChannel can return wrong results. Calling SetCollisionProfileName first with some dummy name and then again with the intended name will apply correct collision profile and the components will start to colliding and overlapping as they should.

I wrapped this to a function to make a playable proof of concept nativized build for benchmarking, but it is in no way sustainable to add that everywhere where custom collision profiles are used. I attached picture of the fixup function.

4.17.1 still has the same bug.

4.18.2 still has the same bug.

4.21 still has the same bug.

it says: Target Fix 4.22

Yes. But before that, it said target fix 4.21, and before that, 4.20…

Rudy, is there some developer comment available as to why this is not being fixed? It has been retargeted several times now, and currently has no target release at all.

I used the method discovered by @jh_hmq for a while, which fixed some things, but then I encountered a very stubborn issue where a couple actors refused to overlap in packaged+nativized Blueprint, even though their collision channels were reporting correctly (via “Get collision response to channel” → “Print text” on runtime). Somehow, re-applying every collision channel solved this problem (“Get collision response” → “Set collision response”). Only god knows why this works.

tl;dr: I now have this function attached to every collide-able actor’s BeginPlay event, which takes an array of “Primitive component object references” and applies this nonsense workaround to each.

Thank you seanny, it works! (づ。◕‿‿◕。)づ

I’ll append a new note because the issue is still happening in 4.23.1 and it seems to be getting worse. The way I’ve been solving inexplicable nativization-collision bugs lately is by spawning collision components at Event Begin Play rather than setting them up prior to runtime. I wish Epic would just fix this.

I haven’t tested it, but issue #UE-44333 is marked as “fixed” for UE 4.25.

It doesn’t seem to be resolved by the PR by epic (tested on 4.24.3)