I have read earlier threads where people asked if it was possible to limit a 2D characters movement to the left/right axis (i.e. to create a side-scrolling platformer-ish movement) while still using a point and click mouse interface, and I know that it's not possible within AC. I also know that the best way to achieve something close within AC is to make the navmesh extremely narrow.
However, I thought I'd ask again to check if there had been any updates/new features that somehow allow this? And if not,
@ChrisIceBox do you think it would be possible to restrict the character to the left/right axis with some not-too-large script, and if you can think of a way could you give some general pointers as to how it might be achieved?
Comments
@ChrisIceBox
I've encountered a problem with this navigation method. Initially it's working fine, but if I have a hotspot set to "player action = walk to marker", the player walks on the Y axis. Which is strange actually, since the marker is placed on the same Y coordinate as the player.
Afterwards the player is stuck on the new Y value.
Here is a video showing the problem: https://www.loom.com/share/aa835b26981b429da71d26691ab7baaa
EDIT: On further inspection, it seems that the player doesn't really walk to the marker at all, since if I put the marker in an entirely different place, the player still walks to above the hotspot - only a slightly different position.
2nd EDIT: Also, if I have two hotspots with a walk-to marker each, the player still walks to almost the same position, no matter which hotspot I click, so the position might not even be related to the position of the hotspot.
I've updated the script to account for hovering over a Hotspot - grab it again and see if the issue remains.
If so, what is the effect of removing the script from the scene, so far as clicking such Hotspots go?
Ah, you know what, I was just going to say, that the updated script made no difference, but then when checking the effect of removing the script, and the result was still the same, it dawned on me.
The problem was that my navmesh was still just the standard pentagon in the middle of the screen, so that's the spot the player was walking to.
I didn't realize that I still needed the navmesh for this navigation method. Now I've just extended the navmesh to fill the entirety of the screen, and it seems to be working perfectly
Thanks for the help!
Yes, the script only affects gameplay clicks - not the character's behaviour when moving automatically, i.e. towards pre-set Markers.