Resonite-Issues icon indicating copy to clipboard operation
Resonite-Issues copied to clipboard

ProtoFlux node to get the interaction laser's hit data

Open Nytra opened this issue 1 year ago • 6 comments

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)

Nytra avatar Oct 01 '24 05:10 Nytra

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.

TisFoolish avatar Oct 01 '24 06:10 TisFoolish

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?

LexiBasilisk avatar Oct 01 '24 13:10 LexiBasilisk

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.

Nytra avatar Oct 01 '24 22:10 Nytra

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?

LexiBasilisk avatar Oct 01 '24 23:10 LexiBasilisk

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.

Nytra avatar Oct 01 '24 23:10 Nytra

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.

ModernBalloonie avatar Oct 09 '24 19:10 ModernBalloonie

This would solve a huge issue I'm having at the moment. Using a raycast from the tool tip is not reliable in the case where there are objects occluding the tool's path to an object, but your view is not occluded.

For example in desktop mode:

  • Place an inspector in front of your hand, but don't occlude the center of your view
  • Point at an object in the distance

Note that your cursor is not blocked by having the inspector in front of your hand, it respects what you can see in context. There is no easy way to solve this problem without totally reinventing the cursor behavior entirely, especially considering that your view in desktop mode can be completely separate from your body in freecam.

There are many uses for having raw access to the hit data/cursor:

  • Improving desktop tool use with UI Focus mode
  • UI interactions in desktop mode (such as what Nytra mentions above)
  • Drawing applications in desktop mode where you want to show the cursor of where someone is intending to draw
  • Getting exact cursor location to help with view-based interactions which depend on a user being in third person vs first person

lxw404 avatar Dec 22 '24 22:12 lxw404

This would be quite useful for a bunch of things where you're wanting to create custom laser interactions without a tool equipped. I can think of a bunch of uses, and I figure since the raycast already happens exposing the hit information wouldn't even have a performance impact.

JackTheFoxOtter avatar Jul 05 '25 13:07 JackTheFoxOtter