May 28th, 2021
Q&A: How does picking items off the belt work?
https://www.youtube.com/watch?v=dyqOMITwLsY&t=1726
Suggested Wiki Refrence Code
Topics
Transcription
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
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.
Snutt
Okay.
Ben
But otherwise how it works, it's all the belts are on splines.
Let's see.
You see the white thin line.
Snutt
Oh, I wish I had more vertices.
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
Snutt
on the
Ben
belt itself instead.
Snutt
We
Ben
cannot make thousands of hitboxes for that all the time.
Snutt
It's
Ben
just not doable.
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.
Ben
Yeah, it's abstract data being represented.
Snutt
Yeah.
Cool.