Ok, I've had to change the behaviour of the sonic sensor due to bugs with the raycasting. Thought this was as it was ment to be, but now i think it is a bug? So is it a bug that you cannot detect a block at (0,0,2) if there is a block at (0,0,1)?Īnother thing i noticed, is that getTargets() is implemented in the java code. What is the reason for this? Edit:Īfter looking at the source code for the sonicSensor.java, i see that i looks like that you ment to be able to query any block within the sensor range. They are always -1 X off, compared to the coordinates given in the scan request. This could be solved by returning a block of "Type" AIR, when the block could be scanned and only contains air.Īnother thing is the coordinates returned together with the block type. Another problem with this is that, the only way i can detect if a scanned block is air or if it could not be scanned, is to figure out for my self if there is another blocking the path between the turtle and the scanned block. I like the idea that you cannot scan blocks where the vector between the turtle and the block is blocked by another block, however this doesn't seem to work correctly. The liquid seems to be misplaced 1 block out of the negative x axis. The -X corners cannot be scanned while the +X corners can. I guess the reason for this is the same as in "Test 1". In this case there is no block blocking the vector between the turtle and the scanned block. block at (0,1,2) cannot be detected, when there is a block at (0,1,1), even though there is no block at (0,0,1) or (0,0,2). However if I do the same test with the blocks either one level above or under the turtle(i.e. This implies that it is correct that the sensor shouldn't be able to scan blocks where the vector from the turtle to the block is blocked by another block. Seems like a bug, since that a block will only report as unknown if there is no block at +X. I am wondering why the 3 blocks in front(+X) of the turtle are reported as unknown. All tests is done at y=0, and checking all blocks from -2 to 2 in both x and z directions.+X -Z.+Z.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |