I'm using the Simultaneous Hotspot labels script and Proximity-based Interaction menus to create Life Is Strange-style interactions.
But the problem is that the player stops moving as soon as the hotspot menu is activated.
In other words, the touch input is disabled when the hotspot menu is visible.
In other words, the direct movement method and direct movement: drag based is not working when the HotspotDetector on the player detects and activates the hotspot menu.
I'm using Unity version: 2020.3.2f1
And Adventure creator version: 1.75.6
Here are some screenshots of my inspector and settings.
Interface Settings: https://imgur.com/a/UzOt7kI
Hotspot Settings: https://imgur.com/a/FTCDp9m
Hotspot menu settings: https://imgur.com/a/uJEZNGB
Interaction menu settings: https://imgur.com/a/sz3lYwk
Movement settings: https://imgur.com/a/mpcVwuB
MultiHotspotLabel script on hotspot Gameobjects: https://imgur.com/a/fkyEoN8
InteractionOnNearest script added to player prefab: https://imgur.com/a/q0u18xg
Game view and Scene view Video: https://imgur.com/a/EI239mT
Player Switching: Do not allow
HotsoptDetctor is added to the player prefab as a child.
I'm making the game for touch screen devices.
It is currently set as Android in the build settings.
There are no console errors.
I'm an artist and know nothing about coding and I don't want to spend any time trying to understand code.
Thank you for your help.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I think I solved the problem by changing the Old Interaction menu: appear type to On Hotspot. I was misled as renaming the menu to Interaction_old did not tell AC to use the new interaction menu. But how do I choose which menu AC should be using for Interaction Menu?
https://imgur.com/a/yNYHg5l
And the other problem is the character doesn't turn their head toward the hotspot.
Player settings: https://imgur.com/a/y0bTaTx
Hotspot settings:https://imgur.com/a/Nz8Djf7
After implimenting the Life is strange interactive menu, the interaction buttons are not triggering the hotspot actionlist. And also I choose to show only those buttons which are linked to available interactions for the hotspot, but all the buttons showing. The actionlist runs fine if I click on the Run button.
Video: https://imgur.com/a/izkusMt
Interaction menu: https://imgur.com/a/kTLyrcw
Hierarchy: https://imgur.com/a/HjOuUQk
Use menu button: https://imgur.com/a/JnKIufM
Hotspot: https://imgur.com/a/9ama70P
Settings manager: https://imgur.com/a/2wGQosN
I'm using Unity version: 2020.3.2f1
And Adventure creator version: 1.75.6
Player Switching: Do not allow
HotsoptDetctor is added to the player prefab as a child.
I'm making the game for touch screen devices.
It is currently set as Android in the build settings.
There are no console errors.
Welcome to the community, @RajSeelam.
Your Interaction menu will need to have its Appear type property set to On Interaction in order for it to respond to the Hotspot it's being turned on for - i.e. only showing the relevant icons.
Setting this back, do you still get the character control issue if you set the Input method to Mouse And Keyboard? This may be an issue with the "Touch Screen" mode combined with your other settings - I will attempt a recreation.
Head-turning requires either the use of IK, or up/down/left/right looking animations to be supplied. This topic is covered as part of the 3D Primer tutorial here.
Thank you for the warm welcome Chris,
Ok, I've switched the Interaction menu's** Appear type** to On Interaction and changed the Input method to Mouse and Keyboard and you were right, it works. So the problem is with the touch screen input method as you suggested.
Using the mouse and keyboard movement method I could move freely and the hotspot menu was activated, but nothing happens when I click on any of the interaction buttons. Not even a blink or any press effect is visible.
Am I doing something wrong with the In scene UI or was something else causing the problem? Here are screenshots of the UI Inspector:
Interaction UI Canvas: https://imgur.com/a/Vo9xEU0
Rect Transform Boundary: https://imgur.com/a/TMaOaWq
Button: https://imgur.com/a/8FR9aDy
Please let me know how we could fix the problem with touch screen input.
And about the interaction buttons, I might be missing something basic I think. Please look into it.
And the head-turning works. Sorry for not doing enough searching before panic-posting it here. I'll take care doing more research before posting it here in the future.
Thanks
Open up AC's PlayerInput script and look for the following towards the bottom of its SetDragState function (around line 1996):
Replace it with the following:
Check that the Button elements list a Constant ID value that matches that of the component on the UI GameObjects - this is how AC links the two together at runtime.
Try also temporarily switching the Interaction menu's Source to Adventure Creator. You may have to tweak the visual sliders in the Menu Manager while previewing it in the Game window to get things in roughly the right position, but use this to see if the Menu still doesn't react properly, or if the issue is to do with Unity UI.
Thank you for the code. It solved the movement problem. Thanks a ton for the great support.
I took note of the Constant ID values and double-checked them. They seem to match. I have tried both Unity UI Prefab and Unity UI In Scene It doesn't work.
But then I tried the Adventure creator's UI and the buttons work as expected. The problem is caused by Unity UI I guess. At this point, I was confused about where to look and what screenshots to share.
I have tried changing most of the settings related to Interaction. But no luck.
I was also hoping that we show the hotspot menu with the Interaction buttons. Right now there is no intereption in the movement but only the Interaction buttons are visible but not the hotspot menu. The hotspot menu is visible only when the player stops moving. If we show the hotspot menu even when movement happens then players can know what interaction is present in that area.
Please guide me forward on how to solve this.
I got the interactive buttons working. I was using a canvas inside a canvas to contain the buttons. I replaced the RectTransfor from Canvas to Panel and it fixed the problem.
What I'm looking for now is a way to show the hotspot menu even when I hold down the touch or click. The hotspot menu disappears when we tap the screen and won't show until we release the tap. This makes it difficult for players to identify which hotspot they are on when moving.
I noticed one thing. When I move the cursor outside the panel which contains the buttons, only then the Hotspot menu appears. This will make the hotspot menu unusable on a touch screen device as lifting the finger leaves the cursor on the spot.
Here is a video: https://imgur.com/a/VkMgmjp
Are you looking to always show the Hotspot name and the Interaction buttons at the same time? If so, try setting the Hotspot menu's Appear type to On Interaction.
At what point does this occur in the video? If the Interaction menu's display is controlled through the InteractionOnNearest script, then it should only turn off when the Player leaves the Hotspot's proximity - it shouldn't be set by the cursor's position.
Okay, I set the Appear type to On Interaction for the hotspot menu and the text doesn't update unless I move the cursor above the RectTransformBoundary of the InteractionUI.
Here is a video:https://imgur.com/a/ZUCFYQd
What's happening in the video is
So the hotspot text doesn't update unless I move the cursor outside of the Interaction menu area.
Hotspot menu settings:https://imgur.com/a/IT5CnGr
Placement of RectTransformBoundary of Interaction Menu:https://imgur.com/a/pCICktA
Thanks for the details. It may be a case of changing/reducing the custom scripts involved - if you're only showing one Hotspot label at a time, in the same place, the simultaneous label script shouldn't be used.
If you could PM me the project as a zip file, I'll be able to dig in properly to see exactly what's going on and what should be changed.
Hi Chris, I sent you the link to download the project in PM.