Can't enable physics on instanced static mesh

Hello,

I’m hoping I’m just missing something very simple here, but I can’t seem to solve this problem.

If I make an empty blueprint actor, and then add an instanced static mesh component, no matter what I do “simulate physics” is always greyed out and I can’t enable it.

The static mesh I tell the component to instance has a collision primitive and if I add the static mesh directly to the scene (not within a blueprint) it simulates without a problem.

Any help with why I can’t simulate physics on an instance would be greatly appreciated. Thanks.

I am also having this issue. Somebody please answer!

Sadly this appears to be not possible.

bool UInstancedStaticMeshComponent::CanEditSimulatePhysics()
{
	// if instancedstaticmeshcomponent, we will never allow it
	return false;
}

It is possible with several limitations, e.g. you’ll have to create special variants for every AddImpulse, AddForce function, which will specify exact instance, if you want to call them code. Also some thing called ‘Aggregates’ from PhysX does not works with this. For collision interaction you’ll have to use somewhat hackish way, but in the end I was even able to play some dominoes with reflective, emissive material:

For code example see this [gist][2]

Hello versusvoid!

Did you update your component to 4.9? I try, but have some throubles with access violation in InitInstanceBody method.

Thanks!

Didn’t open UE for couple of month now. I’ll try to look things up on weekend.
BTW, I got rid of this component in the end, because correctly organized simple static meshes gave indistinguishable performance on my machine.

Since april ISMC was changed a lot and now need to do more changes to enable physical simulation for all body instances. I have reached some progress with it – now body instances can be simulated, but TickComponent is the wrong place for call update transform. Currently I try to find better way for it. If you want, I can share with my last changes.

Can you also please tell me how you organized static meshes in your project?)
Thanks)

In my case it was undoing premature optimizations and simple spawning of static mesh actors. Though after I was investigating possibility of instanced skeletal mesh, but without sufficient success.

Ok, I finally got it to work. If you interested, I will share it. It was not so hard)

Leave a link to gist as new answer here. Someone may also find it and find it useful.

I would very much like to know how you did it. I’m need to use ISMC in place of SMC for draw call performance on GearVR. I have a blueprint that does it one way or the other. Collisions work fine on the individual instances, but they don’t have a physics reaction–because simulate physics is blocked in the C++ as was pointed out.

As was pointed out, ISMC changed a lot. My approach is no longer applicable.