- Home /
How to rig a fidget spinner to spin around a golden dat boi
Basically my game goes that you shoot a bunch of dead memes, and the ultimate boss is a golden dat boi with a fidget spinner force field. I need help on coding it (preferably in C#) on how to instantiate multiple fidget spinners around this object. Any help will be appreciated.
Answer by AcePilot10 · Dec 12, 2017 at 08:36 PM
Well you could instantiate the fidget spinner prefabs at pre determined locations, have a reference to the dat boi GameObject and every update, update the fidget spinners position to rotate around the dat boi.
To do this we could first make a Spawning script which would hold a reference to the fidget spinner object and the locations to spawn it at. You can instantiate it using Object.Instantiate
Next, we could make a fidget spinner script and attach it to the fidget spinner prefab. In this script, we could have a reference to the dat boi GameObject. In this script, every update we could say use Transform.RotateAround
This should make the fidget spinner rotate around the Dat Boi GameObject.
Hope this helps! This game seems so funny, if you need any help, I'd love to collaborate with you!