Support separate displacement maps for left and right hand (#35820)
* Update HandsSystem.cs * Update HandsComponent.cs
This commit is contained in:
@@ -349,7 +349,12 @@ namespace Content.Client.Hands.Systems
|
||||
sprite.LayerSetData(index, layerData);
|
||||
|
||||
//Add displacement maps
|
||||
if (handComp.HandDisplacement is not null)
|
||||
if (hand.Location == HandLocation.Left && handComp.LeftHandDisplacement is not null)
|
||||
_displacement.TryAddDisplacement(handComp.LeftHandDisplacement, sprite, index, key, revealedLayers);
|
||||
else if (hand.Location == HandLocation.Right && handComp.RightHandDisplacement is not null)
|
||||
_displacement.TryAddDisplacement(handComp.RightHandDisplacement, sprite, index, key, revealedLayers);
|
||||
//Fallback to default displacement map
|
||||
else if (handComp.HandDisplacement is not null)
|
||||
_displacement.TryAddDisplacement(handComp.HandDisplacement, sprite, index, key, revealedLayers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user