Adding Collision to a (derived) CustomMeshComponent

Somewhere it has been confirmed the CustomMeshComponent is intended as an example of how to implement generated meshes into your projects. Looking into the available features of the CustomMeshComponent makes this very clear: for example 1) it lacks texture coordinates, 2) it is limited to precisely one single material and 3) it lacks collision.

I’ve been able to fix 1) for me and 2) is currently unnecessary for my needs.

However I am in dire need of 3). I haven’t been working a lot with UE4 from the C++ aspects, let alone procedural mesh generation. Thus I’d need to know how to add collision to the generated mesh. The mesh cannot even be raytraced.

I tried to override FCollisionShape UPrimitiveComponent::GetCollisionShape(float) const, but that didn’t help. I tried adjusting the bounds, to no avail.

I’d be grateful for any leads! Thanks in advance!

Zyr

I have found an alternative solution. Browsing through the available actor components I found the ProceduralMeshComponent, an experimental feature which supports basically everything I needed, including collisions.