DRW Posted July 9, 2015 Share Posted July 9, 2015 Hello, I have a problem, I want to make a big dximage that always looks at the player, and I tried this local white = tocolor(255,255,255,255) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end local pnet = dxCreateTexture("planet.png") addEventHandler("onClientRender", root, function() dxDrawImage3D(0,0, 20, 20, 800, pnet, tocolor(255,255,255,255)) end ) Actually it works... If you look at the right side. If you look at the image from another position it looks like this. I've seen some images like that working perfectly, without distortions and always looking at the player, so, how can I make it like that? Link to comment
.:HyPeX:. Posted July 9, 2015 Share Posted July 9, 2015 Try this local white = tocolor(255,255,255,255) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end local pnet = dxCreateTexture("planet.png") addEventHandler("onClientRender", root, function() local x,y,z = getElementPosition(localPlayer) dxDrawImage3D(0,0, 20, 20, 800, pnet, tocolor(255,255,255,255),0,x,y,z) end ) Link to comment
DRW Posted July 10, 2015 Author Share Posted July 10, 2015 Try this local white = tocolor(255,255,255,255) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...) end local pnet = dxCreateTexture("planet.png") addEventHandler("onClientRender", root, function() local x,y,z = getElementPosition(localPlayer) dxDrawImage3D(0,0, 20, 20, 800, pnet, tocolor(255,255,255,255),0,x,y,z) end ) Still the same 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