How can I convert degrees to vector3 for GlobalWind

Hello,
I am currently working on a live weather system and I want to use roblox’s new GlobalWind feature to replicate the wind direction and speed from real life to in-game. The API I use sends the wind direction and speed seperatly. The Direction in degrees and the speed in Knots. I want to combine these two values into a Vector3 for the wind speed and direction. I am currently unsure on how I go about doing this and what math is involved.
Just for example I want it to do the same thing the Wind plugin does (convert degrees and sps into a Vector3).
image
image

2 Likes

windVec = Vector3.new(math.cos(-windAngle), 0, math.sin(-windAngle)) * windSpeed
This makes positive X the north direction.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.