Skip to content

Commit

Permalink
Merge pull request #1669 from amamagi/remove/mathematics
Browse files Browse the repository at this point in the history
remove Unity.Mathmatics
  • Loading branch information
notargs authored May 31, 2022
2 parents 98fd076 + d2006ca commit f9ee070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Assets/VRM10/Runtime/FastSpringBone/FastSpringBone10.asmdef
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "FastSpringBone10",
"references": [
"GUID:2665a8d13d1b3f18800f46e256720795",
"GUID:d8b63aba1907145bea998dd612889d6b"
"GUID:2665a8d13d1b3f18800f46e256720795"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UniVRM10.FastSpringBones.Blittables;
#if ENABLE_SPRINGBONE_BURST
Expand Down Expand Up @@ -79,8 +78,7 @@ public void Execute(int index)
var collider = Colliders[colliderIndex];
var colliderTransform = Transforms[collider.transformIndex + transformIndexOffset];
var colliderScale = colliderTransform.localToWorldMatrix.lossyScale;
var absColliderScale = math.abs(colliderScale);
var maxColliderScale = math.max(math.max(absColliderScale.x, absColliderScale.y), absColliderScale.z);
var maxColliderScale = Mathf.Max(Mathf.Max(Mathf.Abs(colliderScale.x), Mathf.Abs(colliderScale.y)), Mathf.Abs(colliderScale.z));
var worldPosition = colliderTransform.localToWorldMatrix.MultiplyPoint3x4(collider.offset);
var worldTail = colliderTransform.localToWorldMatrix.MultiplyPoint3x4(collider.tail);

Expand Down Expand Up @@ -148,7 +146,7 @@ private static Quaternion Normalize(Quaternion q)
var num = (float)Math.Sqrt(Quaternion.Dot(q, q));
return num < float.Epsilon ? Quaternion.identity : new Quaternion(q.x / num, q.y / num, q.z / num, q.w / num);
}

private static void ResolveCapsuleCollision(
Vector3 worldTail,
Vector3 worldPosition,
Expand Down

0 comments on commit f9ee070

Please sign in to comment.