Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
195 stars 9 forks source link

MaterialTip's secondary action doesn't work with TooltipSimulator #3826

Open JackTheFoxOtter opened 1 year ago

JackTheFoxOtter commented 1 year ago

Describe the bug?

When using a TooltipSimulator on a MaterialTip, the TooltipSimulator's secondary state doesn't actually trigger the MaterialTip's "select material" secondary action.

Relevant issues

N/A

To Reproduce

Setup a TooltipSimulator with a MaterialTip, give it a simulating user reference and toggle the secondary state.

Expected behavior

The MaterialTip should select the material from the face directly in front of it.

Log Files

No response

Screenshots

No response

How often does it happen?

Always

Does the bug persist after restarting Neos?

No

Neos Version Number

2022.1.28.1335

What Platforms does this occur on?

Windows

Link to Reproduction Item/World

No response

Did this work before?

I Don't Know

If it worked before, on which build?

No response

Additional context

No response

Reporters

No response

shiftyscales commented 1 year ago

Likely a duplicate of #579/the same underlying issue. I apparently tested the material tip in 2020 without issue? Are you using the stock material tip? How are you triggering the secondary action? Are you certain there isn't already a material in the tip?

shiftyscales commented 1 year ago

Definitely doesn't work now. But according to my past self it used to.

Nytra commented 1 year ago

It actually will grab the skybox material if you point it at the skybox, just no other materials.

@shiftyscales

ukilop commented 1 year ago

I’ve also had issue with a simulated LogiX tip unable to grab wires at a distance. And so I believe the underlying issue is tooltipSim isn’t able to raycast. Also, tooltipSim doesn’t trigger any logix node events like OnTooltipEqiup or PrimaryPressed.

shiftyscales commented 1 year ago

Interesting observation, @Nytra. That suggests to me that it just might not be properly receiving the collider. The material tip will pull the skybox when no other colliders are hit.

JackTheFoxOtter commented 1 year ago

I think it's less of a raycast but the MaterialTip explicitly expecting data from the user laser, which doesn't exist on the TooltipSimulator. Although a raycast as an alternative for when no laser is present would work as a potential fix I'd think.

Correction: It looks like that fallback already exists, but the MaterialTip explicitly returns null in the RaycastMaterial method if it is being simulated by the TooltipSimulator. I don't know why that is though, as setting a material (aka primary action) works. Perhaps this was meant as a security mechanism to prevent automated systems from grabbing materials? Although if that's the case I don't see how that could be abused.

Are you using the stock material tip? How are you triggering the secondary action? Are you certain there isn't already a material in the tip?

  • Yes
  • Tried multiple ways of changing / driving the "secondary" field, easiest is just toggling it in the inspector
  • Yes