Merge pull request #2459 from ousttrue/fix/fastspringbone_init_tailpos

springbone 初期化の修正。
This commit is contained in:
ousttrue 2024-10-11 17:55:15 +09:00 committed by GitHub
commit 62b657226b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,16 @@ namespace UniGLTF.SpringBoneJobs.InputPorts
Joints = new NativeArray<BlittableJointMutable>(blittableJoints.ToArray(), Allocator.Persistent);
Colliders = new NativeArray<BlittableCollider>(blittableColliders.ToArray(), Allocator.Persistent);
Logics = new NativeArray<BlittableJointImmutable>(blittableLogics.ToArray(), Allocator.Persistent);
BlittableTransforms = new NativeArray<BlittableTransform>(Transforms.Length, Allocator.Persistent);
BlittableTransforms = new NativeArray<BlittableTransform>(Transforms.Select(transform => new BlittableTransform
{
position = transform.position,
rotation = transform.rotation,
localPosition = transform.localPosition,
localRotation = transform.localRotation,
localScale = transform.localScale,
localToWorldMatrix = transform.localToWorldMatrix,
worldToLocalMatrix = transform.worldToLocalMatrix
}).ToArray(), Allocator.Persistent);
Profiler.EndSample();
}