mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 18:26:12 +08:00
Fix for unexpected huge skeleton render scale when using SPINE_TK2D
This commit is contained in:
parent
69e724a1da
commit
4551a62d4b
@ -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();
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user