When clicked outside Way Borders I "do not want character to move"

  • #1, by davidvacekSaturday, 25. June 2022, 20:58 A year ago
    Hi, just trying out / evaluating Visionaire Studio for my upcoming project. So far looks good smile.

    I have noob question about the pathfinding / way borders system.

    I would like to achieve that when I click outside the way borders the character will not move. I tried to look it up on forum / youtube and by just messing around with stuff. but was not able to achieve this.

    Thank you for the help

    Newbie

    5 Posts


  • #2, by davidvacekSaturday, 25. June 2022, 22:29 A year ago
    Aaah, just found this documentation... that helped me smile...

    https://www.dionous.com/visionaire-guide/#:~:text=Most%20of%...

    I found out when I do not use the "Way points" interconnected inside the "Way borders" and have them outside the border... they still work for scaling, but it turns of the pathfind when clicking outside the "Way borders"

    seems like everything working as I'd like.

    Could this potentionaly create some issues in finding the path when the character is sent to execute action/command "on object" ? So far do not see any strange behaviour.

    Thanks smile

    Newbie

    5 Posts

  • #3, by afrlmeSunday, 26. June 2022, 13:12 A year ago
    The way system path nodes aren't strict. The engine will always try to make the character take the most direct path from the starting destination to the target destination, which tends to be a straight line unless you have cutouts inside of the way border that prevents the character from doing that.

    Way paths are mostly used for scaling & also to calculate the nearest path node when clicking outside of the way border. If there's no way system path nodes (or there aren't enough) then the engine will most likely not be able to automatically calculate the nearest destination position to where the player click & thus the will probably end up not walking anywhere.

    As for scaling outside of the way system, it's something that was recommended to me ages ago & it's something that I recommend often to other people on our discord server. The reason for scaling outside instead of inside is that it's best to scale on the Y-axis (vertical) only if possible, as it's smoother than horizontal scaling. Any way point path nodes inside of the way border should be left with a scaling value of -1 to prevent them from affecting the current scale.

    Out of curiosity why do you want this feature? Only you will know where the way borders are, whereas the player will probably just think there's some weird bug with the game because they might think left click is not always working when they click somewhere.

    Imperator

    7278 Posts

  • #4, by davidvacekMonday, 27. June 2022, 22:43 A year ago
    Thank you for the detailed explenation.

    So far pathfinding tests without way points work pretty well, also with cutouts to way border.
    But clicks are registered also on inactive areas which makes character to stop his action (without the way points present - makes sense as the system is looking for them and when not found, character is stopped in place). Would be cool to have possibility to ignore clicks completely when player will not click over some interactive area. This behaviour can be found for example in Blade Runner and I believe some other older adventure games.

    You are right about the fact only I will know where the borders precisely are, but usually the walkable area is ground, or walking toward some clicked items. I find it strange moving character by clicking on the wall or empty space and sometimes the character can go direction you do not anticipate, at least it happened to me (probably need to try distribute way points better).
    Maybe I am overthinking it and player wise it is more friendly to keep the character walking if you click anywhere.

    Newbie

    5 Posts

  • #5, by afrlmeMonday, 27. June 2022, 23:54 A year ago
    I can't specifically recall any p+c games off the top of my head that specifically utilize what you want or what VS does by default - other than other games made in Visionaire.

    You are probably correct about needing to distribute the way points better. It's mostly down to trial & error, but here's a super helpful tip... left click on a path node to select it & then right click on another to join/unjoin the 2 path nodes. It will let you create a spiderweb type path system. Also you need to find a balance between the amount of nodes you add as both too few & too many can cause random path calculation issues.

    Imperator

    7278 Posts