Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
141 stars 2 forks source link

ProtoFlux node to get the interaction laser's hit data #3029

Open Nytra opened 1 month ago

Nytra commented 1 month ago

Is your feature request related to a problem? Please describe.

I would like a way to get the hit data (hit point, slot, normal etc) of the interaction laser. Currently this cannot be easily done and requires a tool to be equipped, or raycasting from a point on the user's hand which may not line up perfectly with the laser visual.

Describe the solution you'd like

A protoflux node to get the hit data (hit point, slot, normal etc) of the interaction laser. This would not require any tool to be equipped.

Describe alternatives you've considered

Custom tool or raycasting flux

Additional Context

N/a

Requesters

Nytra (discord: nytra)

TisFoolish commented 1 month ago

I'd make use of this for my custom teleport system on my avatar. I currently search for the laser slot and use that for where i generate a ray cast from, but it can easily be broken if the laser system changes and it's not a 1:1 because user lasers bend.

shiftyscales commented 1 month ago

Considering the existing raycaster node already provides all of the requested functionality, it would probably be easier to instead have a node that provides the slot of the InteractionLaser component given the specified chirality.

Unless you're interested in the position of the cursor itself, specifically? Since with laser stickiness, etc. those two do not always line up.

Can you clarify what it is exactly you are wanting to do with the node you are requesting, @Nytra?

Nytra commented 1 month ago

My intention with this is to get exactly where the user is pointing with their laser, which I guess would need to take into account the stickiness/bendiness of the laser.

shiftyscales commented 1 month ago

But what do you intend to do with that data once you have it, @Nytra? I understand the request, I just don't know what you intend to do with it?

Nytra commented 1 month ago

There are many situations where knowing this information would be useful, for example you could know if the user is pointing at a grabbable object or UIX canvas. You could add some kind of effect or popup when this happens. You could have a system track these things and do stuff with them.

ModernBalloonie commented 1 month ago

I have a problem where I wanted to get the hit of a laser that was on a ProtoFlux tool, but the problem is, is that I can't get the raw data tool hit. This could help me solve that problem.