r/unity_tutorials • u/sScriptiee • Aug 19 '20
Spawn New Objects Surrounding The Center Object | Tutorial Link In Comments
58
Upvotes
2
u/Gummi_Ghost Aug 20 '20
This probably uses a lot of math ☆
1
u/sScriptiee Aug 20 '20
Actually, thanks to Unity there is a simple maths behind creating this. That is dividing a whole degree of a circle(360 degrees) into pies using target spawn count and rotating the initial spawn with index times angle of a single pie step around the center game object using Rotate Around function.
In this part of the video, I tried the explain logic behind surround spawning used in the video.
6
u/sScriptiee Aug 19 '20
Hope you like the demos,
Here's the link to the tutorial:
https://youtu.be/9wr81-ButnM