more fix for entity duping
This commit is contained in:
parent
ee57fede24
commit
a2cca66eb2
|
@ -182,9 +182,11 @@ namespace HeavenStudio.Editor.Track
|
||||||
|
|
||||||
te.moving = true;
|
te.moving = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
this.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0);
|
{
|
||||||
this.transform.localPosition = new Vector3(Mathf.Max(Mathp.Round2Nearest(this.transform.localPosition.x, Timeline.SnapInterval()), 0), Timeline.instance.SnapToLayer(this.transform.localPosition.y));
|
this.transform.position = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY - 0.40f, 0);
|
||||||
|
this.transform.localPosition = new Vector3(Mathf.Max(Mathp.Round2Nearest(this.transform.localPosition.x, Timeline.SnapInterval()), 0), Timeline.instance.SnapToLayer(this.transform.localPosition.y));
|
||||||
|
}
|
||||||
|
|
||||||
if (lastPos != transform.localPosition)
|
if (lastPos != transform.localPosition)
|
||||||
{
|
{
|
||||||
|
@ -314,6 +316,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
if (eligibleToMove)
|
if (eligibleToMove)
|
||||||
{
|
{
|
||||||
OnComplete(true);
|
OnComplete(true);
|
||||||
|
moveStartPos = transform.localPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
moving = false;
|
moving = false;
|
||||||
|
|
Loading…
Reference in a new issue