Fix for unexpected huge skeleton render scale when using SPINE_TK2D

This commit is contained in:
invicticide 2015-06-05 00:12:40 -06:00
parent 69e724a1da
commit 4551a62d4b
2 changed files with 20 additions and 20 deletions

View File

@ -648,7 +648,7 @@ public class SkeletonDataAssetInspector : Editor {
this.m_previewUtility.m_Camera.orthographicSize = orthoSet;
float dist = Vector3.Distance(m_previewUtility.m_Camera.transform.position, m_posGoal);
if (dist > 60f * ((SkeletonDataAsset)target).scale) {
if(dist > 0f) {
Vector3 pos = Vector3.Lerp(this.m_previewUtility.m_Camera.transform.position, m_posGoal, 0.1f);
pos.x = 0;
this.m_previewUtility.m_Camera.transform.position = pos;
@ -857,7 +857,7 @@ public class SkeletonDataAssetInspector : Editor {
case EventType.ScrollWheel:
if (position.Contains(current.mousePosition)) {
m_orthoGoal += current.delta.y * ((SkeletonDataAsset)target).scale * 10;
m_orthoGoal += current.delta.y;
GUIUtility.hotControl = controlID;
current.Use();
}

View File

@ -108,7 +108,7 @@ public class SkeletonDataAsset : ScriptableObject {
#else
if (spriteCollection != null) {
attachmentLoader = new SpriteCollectionAttachmentLoader(spriteCollection);
skeletonDataScale = (1.0f / (spriteCollection.invOrthoSize * spriteCollection.halfTargetHeight) * scale) * 100f;
skeletonDataScale = (1.0f / (spriteCollection.invOrthoSize * spriteCollection.halfTargetHeight) * scale);
} else {
if (atlasArr.Length == 0) {
Reset();