I’m playing with the Roblox Particle Emitter system and I want to make it accelerate due to the wind.
I’m trying to make a script where it gets a rotation in degrees and then changes the X, Z acceleration according to the degrees.
Is there any formula or script that I can use to achieve this?
Thanks!
Assuming angle 0 points in the positive x direction, your x and z acceleration would be math.cos(angle)
and math.sin(angle)
, respectively.
(Ensure that your angle is in radians; use math.rad(degreeAngle)
to convert degrees to radians.)