add offset angle of roundly layouter.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
||||||
{
|
{
|
||||||
[SerializeField] float radius = 10f;
|
[SerializeField] float radius = 10f;
|
||||||
|
[SerializeField] float offsetAngle = 0f;
|
||||||
|
|
||||||
void OnDisable()
|
void OnDisable()
|
||||||
{
|
{
|
||||||
@@ -26,7 +27,7 @@ public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
|||||||
radius = Mathf.Max(radius, (totalWidth + margin) / (2 * Mathf.PI));
|
radius = Mathf.Max(radius, (totalWidth + margin) / (2 * Mathf.PI));
|
||||||
var totalAngle = totalWidth / radius;
|
var totalAngle = totalWidth / radius;
|
||||||
|
|
||||||
float angle = -totalAngle / 2;
|
float angle = -totalAngle / 2 + offsetAngle * Mathf.Deg2Rad;
|
||||||
foreach (var info in monitors) {
|
foreach (var info in monitors) {
|
||||||
var uddTex = info.uddTexture;
|
var uddTex = info.uddTexture;
|
||||||
var width = uddTex.monitor.widthMeter * (info.mesh.bounds.extents.x * 2f);
|
var width = uddTex.monitor.widthMeter * (info.mesh.bounds.extents.x * 2f);
|
||||||
|
|||||||
Reference in New Issue
Block a user