Isak Åslund

  • # Solo Developer

Click Layers

One of the first challenges was separating logic for clicking on different things. Picking up an item should have a different stop range than talking to NPC. I solved this by assigning layers to the objects, and then handling appropriate action or setters for each case. In a basic sense something like this:

  • World - go_to_position, stop_range = .5
  • Character - go_to_position, stop_range = 3.5
  • Interactable - go_to_position, stop_range = 1
  • Enemy - go_to_target, init_attack