XaskeL Posted January 25, 2019 Share Posted January 25, 2019 (edited) help me find blip coordinates on frames ex, ey this blip position 142 distance from center in radar to the brink of radar local camx,camy,_ = getElementPosition(camera) local ex,ey = 1164.468, -948.094 local t = -math.deg(math.atan2(camx - ex, camy - ey)) local r = t < 0 and t + 360 or t local movx = (math.sin(camrot-r) * 142) local movy = (math.cos(camrot-r) * 142) dxDrawImage(centerx + movx - 12, centery + movy - 12, 24, 24, 'images/icons/4.png', 0, 0, 0, white, false) Screen I absolutely do not understand math, so I hope that someone will help. Edited January 25, 2019 by XaskeL Link to comment
Peti Posted January 25, 2019 Share Posted January 25, 2019 I think you should take a look at these two: https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints2D https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D Link to comment
XaskeL Posted January 25, 2019 Author Share Posted January 25, 2019 48 minutes ago, Peti said: I think you should take a look at these two: https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints2D https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D I need to understand how to calculate the turn of the blip around the radar, as well as its position to the center of the radar Link to comment
XaskeL Posted January 25, 2019 Author Share Posted January 25, 2019 (edited) del Edited January 25, 2019 by XaskeL Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now