Hello,
I am attempting to use the Hotspot: Check Selected action for an Input ActionList.
In my desired scenario, when the player is holding an ax, the input to use the ax gets enabled. When the player presses that input, the ax swings but only if the player isn't looking at a hotspot.
I have confirmed that the actionlist does run when I remove the Hotspot: Check Selected action at the start, so I feel like either I am not understanding what the action actually does, I am using it wrong, or perhaps there is a slight bug with the hotspot check.
Below is a picture of the ActionList in question, as you can see the first thing I do is check if there is no hotspot selected before continuing with the swing ax logic. I will also attach videos, the first video shows the ax swinging being committed AFTER removing the Hotspot: Check Selected action. The second video shows the ax not swinging after adding the Check Selected action as shown in the image depicting the ActionList set up.
Unity version: 2021.3.45f2
AC version: 1.86.0
First Person Interaction, Context Sensitive
Any clarification would be appreciated! I am under the impression that by doing that Hotspot: Check Selected -> None Selected, I should be able to swing the ax when there is no hotspot selected.
ActionList picture: https://imgur.com/a/Ga8zDUG
Video of the actionlist being ran (swinging the ax) AFTER removing the Hotspot: Check Selected Action (so the ActionList in this video is set up as shown in the picture I uploaded.
Video ax working (not checking for hotspots in the Input AL): https://streamable.com/e78vxq
Video ax not working (trying to do the hotspot check): https://streamable.com/c284pk
The only difference between the two videos is not checking for hotspots.
Thank you for any help!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Does your Player character have a Hotspot Detector component? This Action will return the "Not met" condition if they do, and any Hotspot is currently inside it.
Is it possible that the Axe itself is a Hotspot that's being detected? If you pause the game after picking up the axe, try moving it to the Ignore Raycast layer to see if that affects behaviour.
Side note on the ActionList: your Object: Animate Action's Wait until finish? option is unchecked, meaning it'll be run instantly - the Inputs that are turned off will be turned on again before the animation has completed.
Hello, thank you for your response Chris!
I do have a Hotspot Detector that I hadn't noticed was there. I was using a newer Sample FP controller than I usually have and didn't even notice it was there. Disabling it gives me expected behavior now - thank you for your help, I will keep an eye out for that in the future now!