Description

This will result in not getting the Phys Material when doing collision query.

 

Info from the UDN

"Having stepped through the ULandscapeLayerInfoObject::PostEditChangeProperty I can see that the ULandscapeInfo seems to have the correct layers in it and ChangedPhysMaterial is called on the ALandscapeProxy as is intended. It seems to get complete its path through this function, calling RecreateCollision on all of the ULandscapeHeightfieldCollisionComponents.

However, when querying the PhysMaterial of one of these components using a LineTrace hitresult I still get the old value. I can get the landscape to update to the new values by editing CollisionMipLevel or GenerateOverlapEvents on the LandscapeProxy in the details window of the editor. This triggers ALandscapeProxy::PostEditChangeProperty and subsequently ALandscapeProxy::RecreateCollisionComponents.

It also appears as though only the landscape of the currently open map would be updated if ULandscapeLayerInfoObject::PostEditChangeProperty were to work as intended. Leaving the landscapes on any other levels not updated and not aware that they should update when those maps are opened.

I have recreated the issue on a clean map containing only a landscape with a default phys material of "None". If I do a line trace down to the landscape I correctly get back the "DefaultPhysicsMaterial". If I then change the Default Phys Material to Lava it still returns None. If I then toggle generate overlap events on and off again then it will return Lava. This may be a slightly different issue to the LandscapeLayerInfoObjects being modified but, having the same solution, it seems to be related."

Steps to Reproduce

see description

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-72309 in the post.

0
Login to Vote

Cannot Reproduce
CreatedApr 4, 2019
ResolvedApr 8, 2019
UpdatedMar 31, 2021
View Jira Issue