need help rotating a minimap?
Alright so i have a minimap and it gives the distances and placements correctly but then i added a roation method using an earlier post and it is behaving very weirdly like half working i guess anyway the math is well above me so could someone explain it and help me out
here is the code that i have so far
01 | local sx, sy, sz, m 00 , m 01 , m 02 , m 10 , m 11 , m 12 , m 20 , m 21 , m 22 = head.CFrame:components() |
02 | heading = math.atan 2 (m 02 , m 22 ) |
04 | local rotMod = rot(Vector 2. new( 75 , 75 ), f.AbsolutePosition, heading) |
05 | f.Position = f.Position + UDim 2. new( 0 , rotMod.x, 0 , rotMod.y) |
07 | function rot(center, point, deg) |
08 | point = (point - center) |
10 | local len = point.magnitude |
12 | local rad = math.atan 2 (point.y, point.x)+ deg |
13 | point = Vector 2. new(math.cos(rad), math.sin(rad))*len |
14 | return (point-point_c) |