Instantiate at direction(in degrees) + distance(in units)
I dislike Unity's measuring system and need to use relative positions for a project I'm doing. The normal x + y system is working against me, and I need an alternative, but don't know how. Example:
If I want to spawn an object one unit below 0,0; I could instantiate at 0,-1. However, theoretically, I could also tell the engine to instantiate one unit away from 0,0; in the direction 90° around z, and get the same outcome. This means I could create a hexagon with r=1 unit, by creating a point at:
1 unit in direction 0°
1 unit in direction 60°
1 unit in direction 120°
1 unit in direction 180°
1 unit in direction 240°
1 unit in direction 300° This would be way easier than to figure out the exact location of each point beforehand. And with cases like one unit at 45°, I'd avoid the irrational number of √2.
If anyone knows how to hardcode this, or even create a system that I could easily call in code instead of the bulky x,y positions, it would greatly be appreciated. Please feel free to ask for elaboration if my poor wording confuses you. Thanks
Your answer