This commit is contained in:
2025-05-22 10:16:04 +08:00
parent b0abc1c30a
commit fa586fccac
115 changed files with 3440 additions and 19 deletions

View File

@@ -0,0 +1,48 @@
using System;
using UnityEngine;
namespace PhysicsTools
{
[Serializable]
public class JointProperties
{
[Serializable]
public enum Type
{
CONFIGURABLE_JOINT = 0,
HINGE_JOINT = 1
}
public Type type;
[Range(0f, 180f)]
public float twistLimitDeg;
[Range(0f, 180f)]
public float swingLimitDeg;
[Range(0f, 0.5f)]
public float offsetScale;
[Range(0f, 90f)]
public float twistOffsetDeg;
public float breakingForce;
public float projectionDistance;
public float projectionDistanceFirst;
public JointProperties()
{
type = Type.CONFIGURABLE_JOINT;
twistLimitDeg = 10f;
swingLimitDeg = 50f;
offsetScale = 0f;
twistOffsetDeg = 0f;
breakingForce = 0f;
projectionDistance = 0.1f;
projectionDistanceFirst = 0.001f;
}
}
}