I am trying to overlay 2D elements on the current objects in a scene in a game. I want to take them as picture element rather than any variable or a camera unit. So, I want to see 1:1-pixel thing at the same time with relative position and perfect pixel snapping measure.
The first thing is the health bar, which is directly placed on the RTS position. The camera does not affect the pixelation position of the health bar. Also, I have fixed the size of the game. The outer border doesn't have size more than 99x9 with the inner border as 98x8 px size. I am expecting sharpness with the 1px border; this will reduce the inner rectangle size to 97x7 pixels.
I am using UI to get this function done. It all started with canvas, but if the size is mixed with render mode mapped to world space, it is removing the current pixel scaling. With snapping options available and without any scalar canvas.
In the second try, I am getting more satisfied by using screen overlay settings. The size is fixed in the scalar form and pixel perfect in the shape of the canvas (this is simple snapping). These elements are getting the exact coordinates in the pixels from matching the correct position. This is the scripted ( I have downloaded from the internet). Further, LateUpdate is used for positioning and perfect world object. After containing the result, I am using WorldToScreenPoint.
The zooming with the grab is confirming the desired effect; this is being tested on the hardware. But you can clearly see, this is the editor problem. I have to use more dynamic alternative overlay. I am trying to do the perfect match with the editor mode. Right now, I am using an orthographic camera. The health bar is completely covering the editor space plus it is not correctly positioned in the object position.
I am thinking about an alternative method to this one, which should not have loaded on the memory and provide exact desired results as discussed above. Someone has mentioned, I need to become an expert in the 2DToolkit, but I don't know much about it? What other options do I have?
For your information, I am assigned a semester assignment by my master professor. My job is to create an AI robot, which will be able to play the game without any human help. In order to do that, I will need serious programming with 1 to 1 results from the game. To (or “intending to”) extract the data from the whole game, I am getting the data from http://unturneditemid.com. This is a simple script, which is just getting the data in JSON form. After that, I am reviewing the results (with the help of AI algorithm) and feeding it to the robot (alongside with the individual training) of it.
My job is to create an AI robot, which will be able to play the game without any human help.
AI implicates that the software is able to make decisions on its own. Having the software only work from a list of possible responses is not an AI. Some people have spent their entire lives trying to create an AI, it does not sound like something a person could do in one semester.
I am trying to overlay 2D elements on the current objects in a scene in a game. I want to take them as picture element rather than any variable or a camera unit. So, I want to see 1:1-pixel thing at the same time with relative position and perfect pixel snapping measure.
The first thing is the health bar, which is directly placed on the RTS position. The camera does not affect the pixelation position of the health bar. Also, I have fixed the size of the game. The outer border doesn't have size more than 99x9 with the inner border as 98x8 px size. I am expecting sharpness with the 1px border; this will reduce the inner rectangle size to 97x7 pixels.
I am using UI to get this function done. It all started with canvas, but if the size is mixed with render mode mapped to world space, it is removing the current pixel scaling. With snapping options available and without any scalar canvas.
In the second try, I am getting more satisfied by using screen overlay settings. The size is fixed in the scalar form and pixel perfect in the shape of the canvas (this is simple snapping). These elements are getting the exact coordinates in the pixels from matching the correct position. This is the scripted ( I have downloaded from the internet). Further, LateUpdate is used for positioning and perfect world object. After containing the result, I am using WorldToScreenPoint.
The zooming with the grab is confirming the desired effect; this is being tested on the hardware. But you can clearly see, this is the editor problem. I have to use more dynamic alternative overlay. I am trying to do the perfect match with the editor mode. Right now, I am using an orthographic camera. The health bar is completely covering the editor space plus it is not correctly positioned in the object position.
I am thinking about an alternative method to this one, which should not have loaded on the memory and provide exact desired results as discussed above. Someone has mentioned, I need to become an expert in the 2DToolkit, but I don't know much about it? What other options do I have?
For your information, I am assigned a semester assignment by my master professor. My job is to create an AI robot, which will be able to play the game without any human help. In order to do that, I will need serious programming with 1 to 1 results from the game. To (or “intending to”) extract the data from the whole game, I am getting the data from http://unturneditemid.com. This is a simple script, which is just getting the data in JSON form. After that, I am reviewing the results (with the help of AI algorithm) and feeding it to the robot (alongside with the individual training) of it.
AI implicates that the software is able to make decisions on its own. Having the software only work from a list of possible responses is not an AI. Some people have spent their entire lives trying to create an AI, it does not sound like something a person could do in one semester.