Generate Procedural Mesh

Hi All,

I managed to get linear colors passed in though custom UV channels in the end to achieve bloom with a nice gradient:

Now I’m having a really odd problem though. When I started changing the mesh in the editor was also refreshing the physics mesh no problems. However now whenever I modify a spline and refresh it the physics stays the same. This happens on new instances and the ones that were previously updating fine.

The really odd thing is as far as I can tell this isn’t anything that I did. Even when I revert as far back in my git repository as I could, to a point where I know it was all working, it still fails. This happened before and after the 4.7.5 hotfix as well. I’ve followed some of the suggestions in this thread regarding physics but to no avail.

A bit of debugging showed that when the below function is hit on the refresh bPhysicsStateCreated is somehow 0. Has anyone else experienced similar problems to this?



void UProceduralMeshComponent::UpdateCollision()
{
	if(bPhysicsStateCreated)
	{
		DestroyPhysicsState();
		UpdateBodySetup();

		// Works in Packaged build only since UE4.5:
		ModelBodySetup->InvalidatePhysicsData();
		ModelBodySetup->CreatePhysicsMeshes();

		CreatePhysicsState();
	}
}


Edit: A bit more experimentation has shown that I can change the physics state in game by putting an UpdateCollision() call in BeginPlay() but it’s no longer updating in the editor.