Resolved Not interacting with nearest object

Discussion in 'Developer Support' started by Aidden, Mar 4, 2016.

  1. Screenshot 2016-03-04 21.20.34.png

    It tried to interact with the tree in the circle by clicking where the red x is, when there was clearly a much closer tree... @Cloud

  2. Best Answer:
    Post #7 by Arbiter, Apr 6, 2016
  3. Provide a simple test case with code and in-game location.
  4. Varrock west near the oak trees. Pretty simple really. Don't know if it's easy to replicate or not.
    Code (Text):
    2. GameObjects.newQuery().names("Tree").actions("Chop down", "Chop").surroundingsReachable().within(
    3. new Area.Rectangular(new Coordinate(3160, 3387), new Coordinate(3173, 3418))
    4. ).results().nearest().interact("Chop down"(or Chop depending on the thing you're chopping))
  5. If it was going after the other tree then it is likely because the "base position" or center coordinate was closer or the same distance (if same distance, then player sense is used as the tie breaker)
  6. Taking a north oriented screenshot would help deduce if that is the case @Aidden.
  7. So here you can see that the tree it went for is clearly further away. I tried it again while i was there and again it went for a tree other than the one it should have. This is shown in the second image. In both images it went for the circled tree on the right. Screenshot 2016-03-07 10.27.32.png Screenshot 2016-03-07 10.32.27.png
    --- Double Post Merged, Mar 6, 2016, Original Post Date: Mar 6, 2016 ---
    These are normal trees which only have an area of 1x1
  8. Resolving due to thread age. Please re-post if the bug still exists.

Share This Page