DevStein Posted September 15, 2016 Share Posted September 15, 2016 (edited) left-side image - dxDrawImage right-side - dxDrawMaterialLine3D what the reason for rotation image??? code: renderTarget = dxCreateRenderTarget(893,200,true) function draw() dxSetRenderTarget(renderTarget) dxDrawImage(0,0, 893,200, 'ru.png') dxSetRenderTarget() dxDrawImage(0,124, 600,200, renderTarget) dxDrawMaterialLine3D(-2.2850413322449,36.158359527588,3.1171875,-3.982595205307,33.452819824219,3.1096496582031, renderTarget, 1, tocolor(255,255,255,255), -0.43020412325859,32.629917144775,3.1096496582031) end addEventHandler('onClientPreRender',root,draw) Edited September 15, 2016 by DevStein Link to comment
Bonsai Posted September 15, 2016 Share Posted September 15, 2016 What if you rotate the image inside the rendertarget before drawing it? dxDrawImage has a rotation argument. Link to comment
DevStein Posted September 15, 2016 Author Share Posted September 15, 2016 renderTarget = dxCreateRenderTarget(893,200,true) function draw() dxSetRenderTarget(renderTarget) dxDrawImage(0,0, 893,200, 'ru.png', 90) dxSetRenderTarget() dxDrawImage(0,124, 600,200, renderTarget) dxDrawMaterialLine3D(-2.2850413322449,36.158359527588,3.1171875,-3.982595205307,33.452819824219,3.1096496582031, renderTarget, 1, tocolor(255,255,255,255), -0.43020412325859,32.629917144775,3.1096496582031) end addEventHandler('onClientPreRender',root,draw) Link to comment
Dealman Posted September 15, 2016 Share Posted September 15, 2016 I encountered a similar problem when I was making a 3D web browser, if I recall correctly you need to tweak the faceTowardX, faceTowardY, faceTowardZ values of dxDrawMaterialLine3D. I don't currently have MTA installed so I can't do it for you - but that's the wonders of scripting. Play around with it Link to comment
dugasz1 Posted September 15, 2016 Share Posted September 15, 2016 Same problem today with me You have to draw a vertical line not horizontal. This line "will be" in the center of your image and this will be the flat of your image. And as Dealman said you can also rotate it on this line. (The difference between the start and end points will be the height of your image.) Link to comment
Simple0x47 Posted September 16, 2016 Share Posted September 16, 2016 You're Russian, Russian Guys are good on programming :v 1 1 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