hubs icon indicating copy to clipboard operation
hubs copied to clipboard

BG - For Loop node indexes don't end at the expected value.

Open Exairnous opened this issue 2 years ago • 0 comments

Description The wording on the For Loop node suggests it loops while index is less than or equal to endindex, but the actual result is it only loops while index is less than endindex.

To Reproduce Steps to reproduce the behavior:

  1. Add a behavior graph with a Start node.
  2. Connect the Start node to a For Loop node.
  3. Set the endindex property on theFor Loop node to 3.
  4. Connect the For Loop node's loopBody output and index value to a Debug Log node.
  5. Export the file to a GLB and drop it in a behavior graphs room.
  6. See the console logs print 0, 1, 2.

Expected behavior The console logs should print 0, 1, 2, 3

Hardware

  • Device: Laptop
  • OS: Linux
  • Browser: Firefox

Additional context While this is standard behavior in many programming languages it isn't standard behavior to people unfamiliar with programming languages (like many artists), plus programming languages often spell out what is happening like so for (let i = 0; i < 3; i++) { while the node does not.

Exairnous avatar Nov 09 '23 09:11 Exairnous