Search the Community
Showing results for tags 'worldtoscreen'.
Found 3 results
-
Hello, I am new to Arma Scripting and I'm trying to detect an object in a *png file. This is the script I'm trying to get to work. _screenPos = worldToScreen position pickup_truck; _screenX = _screenPos select 0; _screenY = _screenPos select 1; _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs); _myY = (_screenY - safeZoneY) / (safeZoneH); diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ]; Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck. The truck is at around (421,612) but the output I get from the script is (619,542). https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0 Any leads as to why this is happening will be highly appreciated. Thanks, -P
-
I want to locate a particular point in the world space on an image that is saved from Arma3. I have converted the coordinates from worldspace to screenspace using worldToScreen. I also have the image saved using screenshot. How do I transform the co-ordinates from Screenspace to pixel coordinates of the image?
-
Hello, I am new to Arma Scripting and I'm trying to detect an object in a *png file. This is the script I'm trying to get to work. _screenPos = worldToScreen position pickup_truck; _screenX = _screenPos select 0; _screenY = _screenPos select 1; _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs); _myY = (_screenY - safeZoneY) / (safeZoneH); diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ]; Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck. The truck is at around (421,612) but the output I get from the script is (619,542). https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0 Any leads as to why this is happening will be highly appreciated. Thanks, -P screenshot "testFile.png";