void HandleBuildingConstruction() { float distanceFromPlayer = 5; float maxX, maxY; m_CompoundInConstruction.ComputeExtend(out maxX, out maxY); float max = maxX > maxY ? maxX : maxY; Vector3 distance = Camera.main.transform.forward * (distanceFromPlayer + max); Vector3 position = transform.position + distance; //Assets.Script.Core.DebugDrawer.FD_DebugDrawer.DrawFrame(position, Vector3.right, Vector3.up, Vector3.forward, 20); m_CompoundInConstruction.BasePosition = position; m_CompoundInConstruction.SetCompoundTransform(); }