Looking for advice on how to make the mouse for a radial menu

Greetings,

I am trying to create a radial menu and i have succeeded using some of the tutorials and forum threads. However nobody talks about how to create the mouse. The mouse that would only move around the center of the menu and select the guis i’ve created.

Any advice or links to such posts that i might have missed would be greatly appreciated.

Thank you for your time

You can detect when the normal roblox mouse is moved, and once the radial wheel has been created, you can begin adding those offset movements to your radial wheel mouse position. Then use some trigonometry you can calculate which section of the radial menu the fake mouse is currently hovering over.

is there anywhere where i could learn the necessary math?

I can’t find any roblox tutorials, but if you search “finding angles using trig” that should give you some helpful info. Here’s a sample for finding the angle of the mouse relative to the center:

local mousePos = Vector2.new(mouseX, mouseY).Unit--normalize the vector
local mouseAngle = math.atan2(mousePos.X, mousePos.Y)

If you define mouseX and mouseY relative to the center of the radial menu, that should be work!

1 Like