May 28th, 2021 - Q&A: How does picking items off the belt work?

May 28th, 2021

Q&A: How does picking items off the belt work?

https://www.youtube.com/watch?v=dyqOMITwLsY&t=1726

Suggested Wiki Reference Code
Topics
  1. Snutt

    I remember there being a period where you had an implemented

    being able to pick up items on the belts is there anything interesting to share about that because it's you're not actually like since these aren't actually like physical objects in the world uh like how does that work when you're wanting to pick up this particular instance

  2. Ben

    um we have handle states for that state handles i guess they're called um basically the old implementation was relying on the instance component that was on there relying in a way

    just to check if it existed or not, but that's it.

    It didn't even use it.

    So the only fix for that was just saying like, okay, you can always do it.

  3. Snutt

    Okay.

  4. Ben

    But otherwise how it works, it's all the belts are on splines.

    Let's see.

    You see the white thin line.

  5. Snutt

    Oh, I wish I had more vertices.

  6. Ben

    More vert please.

    So basically that line represents the belt.

    So this is zero and that is one.

    and we can calculate from where the player is looking which item to highlight.

    This is getting too much.

    Slower, there we go.

    So we just make an approximation from looking at the belt, because if you hover on the item, you're not getting the item either.

    So it's really based

  7. Snutt

    on the

  8. Ben

    belt itself instead.

  9. Snutt

    We

  10. Ben

    cannot make thousands of hitboxes for that all the time.

  11. Snutt

    It's

  12. Ben

    just not doable.

  13. Snutt

    I guess that's the limitation of doing it this way.

    Like I said, it's not an actual object in the world.

    It's part of the belt, so to speak.

  14. Ben

    Yeah, it's abstract data being represented.

  15. Snutt

    Yeah.

    Cool.