rope处理
This commit is contained in:
18
Assets/Scripts/PhysicsTools/BoneSegment.cs
Normal file
18
Assets/Scripts/PhysicsTools/BoneSegment.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace PhysicsTools
|
||||
{
|
||||
internal class BoneSegment : Segment
|
||||
{
|
||||
public GameObject bone;
|
||||
|
||||
public Matrix4x4 initTransform;
|
||||
|
||||
public BoneSegment(string name, float len, Vector3 pos, Quaternion q, SegmentPropertiesBase segProperties, Rope r, GameObject b)
|
||||
: base(name, len, pos, q, segProperties, r)
|
||||
{
|
||||
bone = b;
|
||||
initTransform = seg.transform.worldToLocalMatrix * bone.transform.localToWorldMatrix;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user