Search Unity

WHAT is this STUPID gameobject's deal? it refuses to go where it's told.

Discussion in 'Editor & General Support' started by MosquitoByte, Mar 9, 2020.

  1. MosquitoByte

    MosquitoByte

    Joined:
    Sep 17, 2018
    Posts:
    213
    This is probably the simplest thing ive ever decided to make, but unity just HAS to make it cause a problem somehow. When the item the game says to grab is grabbed, it's supposed to place a checkmark on top of that item and move the highlighter to the next item. The highlighter is simply moved with "Highlighterpos.x++" which should simply move it a slight bit over to the next item. The problem is that it decides it wants to jump absolutely ANYWHERE IT WANTS. i thought it might be a problem of the fact that its a child of a Canvas Panel, which for some odd reason uses different positioning than any other object, so i tried changing "Highlighterpos.x++" to "Highlighterpos.x += 43.8" (the same amount of distance, but converted to the coordinates that would be on the canvas), and then it jumps that much distance, WAY off the screen. Examples below, please help, i hate unity for this.

    https://i.gyazo.com/9918311220dc471f87a7a647ce99e4c0.gif

    https://i.gyazo.com/c7c0056a9bfc89d22bd39969ab8b19f0.gif
     
  2. MosquitoByte

    MosquitoByte

    Joined:
    Sep 17, 2018
    Posts:
    213
    nevermind, ignore this, it was my fault because i forgot i'd hardcoded a position for testing reasons earlier.