lil☆
lil☆
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I'm rewriting it with a simple rectangle right now completely so it may work now because spreading points equally seems more complicated than just to interpolate perimeter but I'm not sure how to approach arcs yet
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Also what I want is not to draw a rectangle but to place objects equally on edges of rounded rectangle
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
But the thing is I think the gaps emerge not because of the way I do this for-loop but because it requires more density to cover other end of the quarters rather than equal interpolation. I may be wrong about this though
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
But i was calling Interpolate the same but with for (float i = 0f; i < 1f; i += 0.01f) { and it's the second picture
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I actually wasn't using Interpolate for the first picture. It is
Visuals.RoundRect rect = new Visuals.RoundRect(0f,0f,1f,1f,0.1f,false);
for (float i = 0f; i < 10f; i += 0.01f) {
Vector2 point = rect.GetPoint(i);
GameObject obj = GameObject.Instantiate(test, Visuals.RoundRect.OnGround(point), Quaternion.identity);
obj.SetActive(true);
}
Visuals.RoundRect rect = new Visuals.RoundRect(0f,0f,1f,1f,0.1f,false);
for (float i = 0f; i < 10f; i += 0.01f) {
Vector2 point = rect.GetPoint(i);
GameObject obj = GameObject.Instantiate(test, Visuals.RoundRect.OnGround(point), Quaternion.identity);
obj.SetActive(true);
}
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I assume that was the reason but still not sure
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I was just using axis coordinate increment, not angles
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I think it may be solved with angles and a new parameter for angle increment but I'm not sure
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
So i had more gaps
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Density of the points of one end of quarter arc of unit circle is different than density of the same points at the other end of the arc
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Actually I have my stackoverflow question posted by now and I described that I assume that the method I was trying to implement was wrong inherently https://stackoverflow.com/questions/79080391/im-trying-to-implement-rounded-rectangles-that-can-be-used-with-interpolation
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Which maps the point from 0 to perimeter
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
And that it used by GetPoint(Mathf.Lerp(0f, perimeter, t));
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I had a for loop. That goes by 0.01 up to 1
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Interpolate runs for every point I want to get
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I haven't brought the lines where I call the method, only the class itself
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I think the code is full enough to debug it if needed
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
And height is height without two radiuses
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
Which is width without two radiuses
24 replies
CC#
Created by lil☆ on 10/12/2024 in #help
Need help with fixing my rounded rectangle calculation
I sent the constructor to show how i define width and height
24 replies