#interaction system with hover selection

1 messages · Page 1 of 1 (latest)

paper viper
#

By closest to the shapecast I guess you mean to its middle when multiple things are detected? You can just add an empty child placed in a spot you consider middle and compare distances of detected stuff, may not be the greatest solution but not much effort is being put. About a label, it's a part of UI, you want to keep one button hidden in canvas that gets visible when there's an object in your cast(and hides when there isn't).

naive heath
#

yeah i kinda had an idea for that part, the main issue is, how to detect when an item should display it's hovered label? with the setup i have right now, i can only send a signal when i press "interact", but i have no way of knowing if i am colliding an item and if it should be hovered or not

#

i thought about having a signal for when the item enters my collision and another for when it exits but i don't think that's really possible?

#

with my knowledge at least

paper viper
#

In code responsible for detection emit signal whenever an interaction target changes. You can add a string argument to signal so it can also send the interacted object's name to the label, when there is nothing it sends empty string "". And in the label add a simple check that hides hit when it string == "".

#

Should work

naive heath
#

alright i'm gonna try that

pastel stream
#

You also probably should change shapecast to an area

naive heath