Hey there, I’m trying to create a custom thumbstick to make my character face a certain direction, how would you get .Unit from two Gui Positions?
I tried (Udim2.new(0,0,0,0) - Udim2.new(0.5,0,0.5,0)).Unit, it erros that the Unit property is not a part of the positions.
Convert to a Vector2
local diffdim = (Udim2.new(0,0,0,0) - Udim2.new(0.5,0,0.5,0))
local directional_vector = Vector2.new(diffdim.X.Scale, diffdim.Y.Scale).Unit
1 Like