Speak Posted April 29, 2014 Posted April 29, 2014 I think nobody will answer how can I rotate a picture in 3d image rotation local sx,sy = guiGetScreenSize(); function lala() dxDrawImage(sx-240,62+(28),sx-sx+230, 56,"img/timeleft.png") end addEventHandler("onClientRender",getRootElement(),lala) you must use dxDrawImage3d ?
.:HyPeX:. Posted April 29, 2014 Posted April 29, 2014 You want to draw it on the screen? if yes then you should use the rotation arguments dxDrawImage. Basically: Rotation will make the image rotate clockwise. RX: Will set the X point in the screen where the "Moving will be made from" RY: Will set the Y point in the screen where the "Moving will be made from" So, just remember that if you set an image to the left of the RX point, then the rotation will go up. Also remember this will only work on a clock-way, not 3D. About going like that effect, well, you should make the image itself like that with some trasparencies. (Just loading that image you got will do). Else, id say about a shader, nothing else.
Speak Posted April 29, 2014 Author Posted April 29, 2014 Can you give me an example in my code? RX: Will set the X point in the screen where the "Moving will be made from" RY: Will set the Y point in the screen where the "Moving will be made from" does not work for me any example?
.:HyPeX:. Posted April 29, 2014 Posted April 29, 2014 RX: Will set the X point in the screen where the "Moving will be made from"RY: Will set the Y point in the screen where the "Moving will be made from" does not work for me any example? Got a harsh one, you'd need some advanced (or at least good) knowledge of what im doing. (its on dxDrawText, but its the same concept.) This will draw 4 texts (according to the table) sided to the left (they will be drawn 270° clockwise) on positions 0.21,0.41,0.61 and 0.81 of X relative values. --Table Part TextNow = { Text1 = {"Achivements", 0.21, 0.8, 0.1,0.1,270, x * 0.05 + (x*0.2), y*0.85,255}, Text2 = {"Rankings", 0.41 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.4), y*0.85,255}, Text3 = {"Tuning",0.61 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.6), y*0.85,255}, Text4 = {"Settings", 0.81 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.8), y*0.85,255}, } --Drawing i=1 local a = "Text"..i dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8]) i=2 local a = "Text"..i dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8]) i=3 local a = "Text"..i dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true,false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8]) i=4 local a = "Text"..i dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8])
Speak Posted April 29, 2014 Author Posted April 29, 2014 (I want to create an image) someone to help me?
Ren_712 Posted April 30, 2014 Posted April 30, 2014 https://wiki.multitheftauto.com/wiki/Dx ... rTransform This function applies a 3D transformation to a shader element when it is draw with dxDrawImage.
Moderators IIYAMA Posted April 30, 2014 Moderators Posted April 30, 2014 Or just use:(when you don't understand shaders) https://wiki.multitheftauto.com/wiki/Ge ... enPosition https://wiki.multitheftauto.com/wiki/DxDrawLine3D Good luck
Fabioxps Posted April 30, 2014 Posted April 30, 2014 https://wiki.multitheftauto.com/wiki/DxSetShaderTransformThis function applies a 3D transformation to a shader element when it is draw with dxDrawImage. can give an example of how to use dxSetShaderTransform
Fabioxps Posted May 1, 2014 Posted May 1, 2014 https://forum.multitheftauto.com/viewtopic.php?f=91&t=65746&p=619388 text not rotate @gallardo
.:HyPeX:. Posted May 3, 2014 Posted May 3, 2014 dxDrawLine3D cant draw textures @IIYAMA, use https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D instead.
Moderators IIYAMA Posted May 3, 2014 Moderators Posted May 3, 2014 dxDrawLine3D cant draw textures @IIYAMA, use https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D instead. oh yes, my bad. I mixed them up. Thank!
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