This problem seems to occur because Rotation is not taken into account when calculating Weight.
I have confirmed that it can be solved by calculating the rotation as follows.
float ULandscapeComponent::GetLayerWeightAtLocation(const FVector& InLocation, ULandscapeLayerInfoObject* LayerInfo, TArray<uint8>* LayerCache) { ... 1991 // Find location // TODO: Root landscape isn't always loaded, would Proxy suffice? if (ALandscape* Landscape = GetLandscapeActor()) { const FVector DrawScale = Landscape->GetRootComponent()->GetRelativeScale3D(); const FRotator DrawRotator = Landscape->GetRootComponent()->GetRelativeRotation(); //add FVector TestPosition = ((DrawRotator.UnrotateVector(InLocation - Landscape->GetActorLocation())) / DrawScale); //add float TestX = TestPosition.X - (float)GetSectionBase().X; //add float TestY = TestPosition.Y - (float)GetSectionBase().Y; //add // Abort if the test location is not on this component if (TestX < 0 || TestY < 0 || TestX > ComponentSizeQuads || TestY > ComponentSizeQuads) { return 0.0f; } ... }
1. Open Landscape.umap in Content Example
[Link Removed]
2. Set Soil to Landscape Layers of Foliage
[Link Removed]
3. At this time, we should be able to generate Foliage only for the Soil part, but if the rotation value is set to Landscape, it will be an incorrect generation position.
I am not able to find world outliner how to enable it?
Trying to launch , erorr,dll missing
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How to achieve HLSL Multiple Render Target in Material blueprints?
How to properly terminate the DoWork thread function in FAsyncTask?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-89079 in the post.
0 |
Component | UE - LD & Modeling - Terrain - Landscape |
---|---|
Affects Versions | 4.23, 4.24 |
Target Fix | 4.26 |
Created | Feb 19, 2020 |
---|---|
Resolved | Mar 23, 2020 |
Updated | Jun 22, 2020 |