Problem with SetWorldLocation and physics enabled skeletal mesh

I have noticed the following problem:

if physics is enabled, calling SetWorldLocation (either in C++ or blueprint) on a skeletal-mesh does not seem to do anything. This is strange, because with StaticMesh, this works fine.

Then I thought, maybe as a workaround do:

setSimulatePhysiscs(false);
setWorldLocation(newPosition)
setSimulatePhysiscs(true);

but this gives the same result, the skeletalmesh does not move…

if you do

setSimulatePhysiscs(false);
setWorldLocation(newPosition);

on a skeletal mesh that had physics enabled, it DOES move to it’s new position… weird right? (but that leaves you with a skeletal mesh with simulate physics off, which is not what I want)

Somehow it seems that when you use SetWorldLocation on a skeletal mesh, it forgets to update the new location to the physics engine, and the physics engine moves it back to it’s old location.

I assume this is a bug? Could this be fixed please? And does anyone know a workaround?

Thanks!

Hello,

I have reproduced your issue, and have entered a bug report (UE-27783). Thank you for your report. I will provide updates on this issue as they become available.

Have a great day

Bug still there in 4.11.2 with an AActor and physics enabled! Would be great that you fix this bug :S

I’m currently experiencing almost the same exact issue with UStaticMeshComponent.

ItemMeshComponent->SetWorldLocation(NewLocation);  // here is where I set the location	
SetActorHiddenInGame(false);
SetActorEnableCollision(true);
DropItem();


void AItemBase::DropItem()
{	
	bIsCurrentlyHeld = false;
	ItemMeshComponent->SetSimulatePhysics(true); // this line wont let the component move	
	OnItemDropped();
}

However, if I move the physics change inside the blueprint on my OnItemDropped() blueprint event with a 0.1 delay added it works. It’s like it needs a little bit of extra time in order to actually set the location of the staticmeshcomponent and when you set the physics in the code it just happens too fast.