Hi Chris,
First off, thank you for this amazing tool, it’s been a blast to work with so far! I honestly can’t stop recommending it
Unity Version: 6000.0.50f1 LTS
AC version: 1.83.0
I’m running into a small issue when using the keyboard or a controller to interact with hotspots. I’ve defined both InteractionA and InteractionB in Unity Input (screenshot attached), and I’ve also attached screenshots of my Interface and Hotspot settings, as well as my character and the hotspot itself. I also tried Park 2d Demo and it is working. My character imported via Spine (using a script called "AnimEngine_Spine")
You can see all the screenshots here.
Despite this, interactions don't seem to trigger. Could you please take a look and let me know what might be going wrong? I tried to play around with settings, player vicinity and even compared everything with 2d Demo, still not working.
Also, another issue I noticed: when moving around using the keyboard/controller, the character seems to ignore the Navigation Mesh, and I can move all over the screen, it works perfectly fine with the mouse, but not with direct input. I’ve included an image showing this behavior as well.
Thanks so much for your time!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
How far do you get so far as Hotspot selection goes? Do Hotspots become selected, but you can't interact with them - or are they not selecting in the first place?
If it's a selection issue, you're currently using Mouse Over detection, which means you'll need to move a (simulated, due to lack of mouse) cursor around the screen to select Hotspots.
When controlling a game using purely a keyboard or gamepad, it's usually done so using Player Vicinity detection. Setting it up involves an additional step with your Player character, however, as you'll need to assign a "Hotspot detector" as a child object.
A tutorial on this can be found here. It's in 3D, but it's same principle in 2D - just use a Circle Collider 2D component instead of a Sphere Collider.
It's not the Input method, but the Movement method, that's the factor here. Just click Auto-stick to NavMesh? in the Player's Inspector and they should stop leaving the mesh.
Thanks so much, Chris! 🙏
Both issues are now fully resolved thanks to your help!
Switching to Player Vicinity and setting up the Hotspot detector did the trick, works perfectly now with keyboard and controller! Also, ticking Auto-stick to NavMesh fixed the movement issue right away. So simple, yet I completely missed it!
Really appreciate the clear explanation and link to the tutorial. You made my day! 💙