mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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;
|
this.m_previewUtility.m_Camera.orthographicSize = orthoSet;
|
||||||
|
|
||||||
float dist = Vector3.Distance(m_previewUtility.m_Camera.transform.position, m_posGoal);
|
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);
|
Vector3 pos = Vector3.Lerp(this.m_previewUtility.m_Camera.transform.position, m_posGoal, 0.1f);
|
||||||
pos.x = 0;
|
pos.x = 0;
|
||||||
this.m_previewUtility.m_Camera.transform.position = pos;
|
this.m_previewUtility.m_Camera.transform.position = pos;
|
||||||
@ -857,7 +857,7 @@ public class SkeletonDataAssetInspector : Editor {
|
|||||||
case EventType.ScrollWheel:
|
case EventType.ScrollWheel:
|
||||||
if (position.Contains(current.mousePosition)) {
|
if (position.Contains(current.mousePosition)) {
|
||||||
|
|
||||||
m_orthoGoal += current.delta.y * ((SkeletonDataAsset)target).scale * 10;
|
m_orthoGoal += current.delta.y;
|
||||||
GUIUtility.hotControl = controlID;
|
GUIUtility.hotControl = controlID;
|
||||||
current.Use();
|
current.Use();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public class SkeletonDataAsset : ScriptableObject {
|
|||||||
#else
|
#else
|
||||||
if (spriteCollection != null) {
|
if (spriteCollection != null) {
|
||||||
attachmentLoader = new SpriteCollectionAttachmentLoader(spriteCollection);
|
attachmentLoader = new SpriteCollectionAttachmentLoader(spriteCollection);
|
||||||
skeletonDataScale = (1.0f / (spriteCollection.invOrthoSize * spriteCollection.halfTargetHeight) * scale) * 100f;
|
skeletonDataScale = (1.0f / (spriteCollection.invOrthoSize * spriteCollection.halfTargetHeight) * scale);
|
||||||
} else {
|
} else {
|
||||||
if (atlasArr.Length == 0) {
|
if (atlasArr.Length == 0) {
|
||||||
Reset();
|
Reset();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user