developa Posted September 18, 2017 Share Posted September 18, 2017 (edited) @Mr.Loki How to create 3d image with get screen from world position, but with the same image size, even if i am away from that position. 100 dist from image = size=200 I want to do it so: 200 dist from image = The same sizes of image as on 100 dist Image is always as big as i want even if i am much distance from that position How to do??? My code, Here the picture increases with respect to distance, and I want to do as I described above. local element = createVehicle(411, 0, 0, 0) addEventHandler("onClientRender", root, function() local playerPosition = {getElementPosition(localPlayer)} local elementPosition = {getElementPosition(element)} local distance = math.floor(getDistanceBetweenPoints3D(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3])) local coords = {getScreenFromWorldPosition(elementPosition[1], elementPosition[2], elementPosition[3]+0.3)} local clear = isLineOfSightClear(elementPosition[1], elementPosition[2], elementPosition[3], playerPosition[1], playerPosition[2], playerPosition[3], false, false, false, false, true, false, false, nil) if coords[1] and clear then dxDrawText(distance.."m", coords[1], coords[2], coords[1], coords[2], tocolor(255, 255, 255, 255), 2, "default-bold", "center", "center", false, false) dxDrawImage(coords[1], coords[2], 64, 64, "asd.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end) Help, please Edited September 18, 2017 by developa Link to comment
Moderators IIYAMA Posted September 18, 2017 Moderators Share Posted September 18, 2017 This topic has the awnser: Link to comment
developa Posted September 18, 2017 Author Share Posted September 18, 2017 (edited) Not working, The point is that this image has the same size regardless of distance, not to increase XDDDDD Edited September 18, 2017 by developa Link to comment
Moderators IIYAMA Posted September 18, 2017 Moderators Share Posted September 18, 2017 De-increase, not increase. Which should happen when you move away. Check the screenshots. Image1 Image2 Image3 Image4 If this is not what you want, then you should rewrite the concept so I can understand what you want. Link to comment
Tekken Posted September 18, 2017 Share Posted September 18, 2017 20 minutes ago, IIYAMA said: De-increase, not increase. Which should happen when you move away. Check the screenshots. Image1 Image2 Image3 Image4 If this is not what you want, then you should rewrite the concept so I can understand what you want. He want's the image to keep the size when the player move as if the image is somehow tied to the player. Link to comment
Moderators IIYAMA Posted September 18, 2017 Moderators Share Posted September 18, 2017 @Tekken How is that different from the screenshots? Link to comment
developa Posted September 18, 2017 Author Share Posted September 18, 2017 I want to see the SAME SIZE from any DISTANCE! Link to comment
Moderators IIYAMA Posted September 18, 2017 Moderators Share Posted September 18, 2017 54 minutes ago, developa said: I want to see the SAME SIZE from any DISTANCE! Then do not scale it. But keep it the same size... If you are not satisfied with my help, then please ask somebody else to help you with this. 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