So currently I have a 2d scene with a sorting layer, player start, a few animated sprites in the scene, got my NavMesh2d correctly done, also have my collision cubes sorted out (I am using the direct control method.) Everything works great in the scene, I can move around with the arrow keys and what not. Problem comes when I try to set up a hotspot. I followed the tutorial for making a door open, even though that's in 3d I figured it would still work.
I created my HotSpot from the editor, I reshaped it and placed it over the sprite, paying careful attention of its z-axis shape as well. I added the highlight script to my object. On the hotspot itself, I assigned the object to highlight. I created a marker, placed it in front of the hotspot. I assigned the marker with the walk to. I made the interaction as in the tutorial, the transform, and auto created it. Assigned the moveable script to the correct object.
Problem is, in game, when I mouse over the hotspot, nothing happens at all. If I click, nothing happens. It's like it's not detecting the hotspot and I'm not sure what I'm missing.
Any help would be appreciated.
Comments
I'm assuming there's got to be something I'm missing.
The GameCamera2D should be active, i believe. I used the Hotspot2D from the scene manager. I have included 6 pictures to show you my settings, as requested.
I have tried multiple different things, and I just can't get the hotspots to detect in game, and I just don't know what the problem is. Also, as a side issue, I've noticed that the camera seems to have some sort of momentum to it, where I swear it didn't use to before. It'll follow the player character around, but when he stops, it doesn't immediately halt, it kind of slides slowly into place, like it's coming to rest. It wouldn't be a problem, except for the fact that this motion seems to cause the pixel art to redraw on the monitor a bunch of times, almost like when vsync is disabled on a game or something. It's an annoying effect. Any idea what this is? I'm a new user to Unity, I've only been learning it for about 4 days.
http://imgur.com/zO6nSPe
http://imgur.com/TzP3gLK
http://imgur.com/xtH6RZa
http://imgur.com/rrWCLa9
http://imgur.com/vldoHv8
http://imgur.com/syW5Dmo
Transform, Circle Collider 2D, Rigidbody 2D, Player Script, Paths Script, Audio Source, Follow Sorting Map Script
And it seems to work fine. One odd problem though is hitting Trigger2Ds that start a conversation, the character continues walking and I can't stop him.
You can reduce the smoothness with which the camera follows the player by increasing the Follow speed in the GameCamera2D's Inspector.
And for the Trigger problem, see if checking Cancel interactions? in the Trigger Inspector helps. If not, you can force the player to stop by using the Character: Move along path Action and checking Stop moving?.
As for the trigger problem, adding Character: Move along path and stop moving fixed it, thanks so much! Cancel interactions just wasn't doing it.
And thanks for the camera speed tip as well, fixes the issue.
I really appreciate this tool you created and the help you give on the forums on a daily basis. So much to learn. It's invaluable.
The Hotspot should register so long as it's on the Default layer, and nothing else is in front of it. Perhaps it's conflicting with the background sprites. Have you placed them on the Ignore Raycast layer?
I was having a problem with speech showing in subtitles as well, it would only ever show the first letter of a line and then go away, but I found out that the problem was something to do with text scroll, so I disabled it and the text displays properly.
I've modified the finished 2D tutorial scene so the character navigates properly with the arrow keys/WASD, and hotspot labels appear when the player nears them, but I can't seem to figure out how to interact with them. They were set up to work with the point-and-click system, but the switch to direct control seems to have removed their functionality beyond the label appearing when in proximity to it.