Hello!
I’ve been making a game recently that is very similar to a pretty popular game called Bee Swarm Simulator
, and in this game there are Monters that when killed drop Loot in form of small Tokens you can pick up, these tokens spawn in a circle shape around the Enemy’s Position after its killed.
Im trying to replicate how these Loot Tokens spawn in my game, but can’t seem to find a good way of getting a Position for each Token around the radius of a Killed Enemy’s Position.
I’ve tried using this method:
local Theta = -0.11;
local LAST_ENEMY_POSITION = script.Parent.Position;
local RADIUS = 6;
script.Parent.Part2.Position = Vector3.new(LAST_ENEMY_POSITION.X + RADIUS * math.sin(Theta), LAST_ENEMY_POSITION.Y, LAST_ENEMY_POSITION.Z + RADIUS * math.cos(Theta));
But it seems very hard to use, because it uses a Theta
Variable which im not very fond of because it’s very confusing, example:
With a Theta value of 0
, we get this scenario:
The Green Part stays on the same X Axis to the main Part (The Blue one), which is expected.
Now if i go to a Theta Value of 360
, you’d assume the Part should stay on the same X Axis as the main Part, but just on the other side, but no:
I might be very stupid and not understand how this works, but i would love some clarification on how to use this method or if another method exists.
Thanks for reading!