Update effector base and push apart effector
This commit is contained in:
@@ -5,14 +5,14 @@ using UnityEngine;
|
||||
namespace Misaki.ArtTool
|
||||
{
|
||||
[Serializable]
|
||||
public class GridDistributionSetting
|
||||
public struct GridDistributionSetting
|
||||
{
|
||||
public int3 count = new(3, 3, 3);
|
||||
public float3 spacing = new(1.0f, 1.0f, 1.0f);
|
||||
public int3 count;
|
||||
public float3 spacing;
|
||||
public GridShape shape;
|
||||
[Range(0.0f, 1.0f)]
|
||||
public float fill = 1.0f;
|
||||
public float fill;
|
||||
|
||||
public int DistributionCount => count.x * count.y * count.z;
|
||||
public readonly int DistributionCount => count.x * count.y * count.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ using Unity.Mathematics;
|
||||
namespace Misaki.ArtTool
|
||||
{
|
||||
[Serializable]
|
||||
public class LinearDistributionSetting
|
||||
public struct LinearDistributionSetting
|
||||
{
|
||||
public uint count = 10;
|
||||
public uint indexOffset = 0;
|
||||
public uint count;
|
||||
public uint indexOffset;
|
||||
|
||||
public float3 positionSpacing = new(0.0f, 1.0f, 0.0f);
|
||||
public float3 rotationSpacing = float3.zero;
|
||||
public float3 scaleSpacing = new(1.0f, 1.0f, 1.0f);
|
||||
public float3 positionSpacing;
|
||||
public float3 rotationSpacing;
|
||||
public float3 scaleSpacing;
|
||||
|
||||
public float3 stepRotation = float3.zero;
|
||||
public float3 stepRotation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,39 @@
|
||||
using System;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Splines;
|
||||
|
||||
namespace Misaki.ArtTool
|
||||
{
|
||||
[Serializable]
|
||||
public class SplineDistributionSetting
|
||||
public struct SplineDistributionSetting
|
||||
{
|
||||
public SplineContainer spline;
|
||||
|
||||
public int indexOffset;
|
||||
|
||||
public uint count = 10;
|
||||
public float spacing = 1.0f;
|
||||
public uint count;
|
||||
public float spacing;
|
||||
|
||||
public bool isSpacingMode;
|
||||
|
||||
[HideInInspector]
|
||||
public float4x4 splineWorldMatrix;
|
||||
[HideInInspector]
|
||||
public float splineLength;
|
||||
|
||||
public int DistributionCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (spline == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (isSpacingMode)
|
||||
{
|
||||
return Mathf.RoundToInt(spline.CalculateLength() / spacing) + 1;
|
||||
return Mathf.FloorToInt(spline.CalculateLength() / spacing) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user