Added object distributuon calculationg
This commit is contained in:
@@ -5,6 +5,8 @@ namespace Misaki.ArtTool
|
||||
{
|
||||
public class SphereField : FieldBase
|
||||
{
|
||||
public RemappingSetting remappingSetting = new();
|
||||
|
||||
public float radius = 1.0f;
|
||||
|
||||
private float3 fieldPosition;
|
||||
@@ -14,10 +16,10 @@ namespace Misaki.ArtTool
|
||||
fieldPosition = transform.position;
|
||||
}
|
||||
|
||||
public override float Operate(float3 position)
|
||||
public override float Operate(float3 position, float weight)
|
||||
{
|
||||
var weight = ShapeHelper.Linear01DistanceToSphereCenter(position, fieldPosition, radius);
|
||||
weight = Remapping(weight);
|
||||
weight = ShapeHelper.Linear01DistanceToSphereCenter(position, fieldPosition, radius);
|
||||
weight = FieldHelper.ApplyRemapping(weight, ref remappingSetting);
|
||||
|
||||
return weight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user