summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Unit/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Unit/Controller')
-rw-r--r--Assets/Scripts/Unit/Controller/UnitController.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Assets/Scripts/Unit/Controller/UnitController.cs b/Assets/Scripts/Unit/Controller/UnitController.cs
index 2f43b4e4..bbcdc745 100644
--- a/Assets/Scripts/Unit/Controller/UnitController.cs
+++ b/Assets/Scripts/Unit/Controller/UnitController.cs
@@ -94,6 +94,11 @@ public class UnitController : MonoBehaviour/*, Interactable*/
{
return GetComponentInChildren<Renderer>().bounds.center;
}
+ set
+ {
+ Vector3 offset = new Vector3(0, -GetComponentInChildren<Renderer>().bounds.size.y / 2f, 0);
+ transform.position = value + offset;
+ }
}
public virtual void Initialize( GameObject obj , string folder)