Search Unity

◄FREE► Arrow WayPointer - Show players the way

Discussion in 'Assets and Asset Store' started by Stephen_O, Jun 10, 2015.

  1. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    An automated tool that allows you to quickly add waypoints and an arrow to your scene to point at them. Use it for guiding players through quests, help in tutorial missions, or other game-play features. Waypoints can also trigger a UnityEvent to call custom methods from your own scripts, other objects in the scene or any other use you may have. Written in C#.




    Arrow Waypointer Unity Asset Store 1.png
     
    Last edited: Apr 27, 2019
    glenneroo and John3D like this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Nice asset TTGO.
    Can the way point be 'killed' based on distance instead of collision? I think it'd be nice if the way point would die if the character came within 2-3 meters instead of having to collide with it - that would make the pointer a little more smoother transition from current to next.
    Nice work - and by the way - nice Link character also. :)
     
  3. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Thanks.
    It's not in there now. I'l add that as an alternate trigger in the next update, I can think of a couple reasons why that might be useful. I'll also work on something to smooth arrow movement between points.
     
    theANMATOR2b likes this.
  4. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've submitted an update for this asset to include player range detection for waypoints in addition to collision detection. Each waypoint can now be reached when the player is within set range, just assign the player transform in the waypoint controller inspector.

    I'll add a smooth control for the arrow in the next update.
     
    Last edited: Jan 28, 2016
    theANMATOR2b likes this.
  5. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    New update Version 1.11 submitted.

    -Added "Arrow Target Smooth" slider, this controls how fast the arrow will point toward the next waypoint.
    -Added "Waypoint Components" reference, easily get a reference to any waypoint in the manager.
    -Improved demo scene.
     
  6. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    v1.11 is now available.
     
  7. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Hi,

    Can this asset use navmesh path points and will it be still smooth with navmesh path points?
     
  8. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I've actually only used a NavMesh maybe once and don't recall much. If you have an example reference you can point me to I can do a test to see if it fits your use case.

    The script itself generates waypoints(transforms that can be manually placed around a scene). I'm sure if you had a position value that you might get from a navmesh and wanted to use those for waypoint positions you can use them to set the transform positions for waypoints with a custom script. I would assume this would all be situational based on the needs of your project if this is what you mean.
     
  9. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    354
    Yes, I want to feed the waypoint positions from the created path. But when I scripted my own arrow code, since the navmesh creates the waypoints like I shown in the image below, the arrow object doesn't move smooth. I see you have good smoothness between the changed waypoint, but the navmesh creates 2 or 3 very close waypoint at corners so I wanted to first see how it behaves.

    I also create paths at runtime according to player's and target's position.

    I created a very simple project so you can test your asset, if you have time, I would appreciate.
     

    Attached Files:

  10. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I tested it for you based on the transform positions of the waypoints generated from your script, the arrow indeed still smoothly moves to the positions (you can also adjust the speed at which the arrows smoothMoves). I should have known that without a test but it has been a while since I tested this asset and the features..

    The thing you will need to do is customize the script a bit to generate the waypoints when you need and auto place them, however this is exactly what your script does so it should not be an issue. You can message me for support if needed.
     
  11. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.13 submitted.

    New features and additions:
    • Configure unique Unity Events for each waypoint to be triggered when it's is reached.
    • Added package for Unity 4.6.7
     

    Attached Files:

  12. YektaOz

    YektaOz

    Joined:
    Dec 23, 2016
    Posts:
    6
    Is there a way to reset/restart the waypoint path?
     
    Stephen_O likes this.
  13. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    I just submitted an update so the WaypointController can do this.

    You can make the change manually if you want it sooner; open this script:

    Assets\TurnTheGameOn\Arrow WayPointer\Scripts\WaypointController.cs

    and add the following method around line 45:

    Code (CSharp):
    1. public void Reset()
    2. {
    3.      nextWP = 0;
    4.      ChangeTarget();
    5. }
    This will allow you to make a reference to the waypoint controller and call reset from your own code.

    Code (CSharp):
    1. public TurnTheGameOn.ArrowWaypointer.WaypointController waypointController;
    2.  
    3. void YourMethod()
    4. {
    5.    waypointController.Reset();
    6. }
     
    YektaOz likes this.
  14. joeyether40

    joeyether40

    Joined:
    Jan 26, 2018
    Posts:
    20
    Great Asset. I am just wondering is there a way to save the current waypoint when the player dies, so he can resume his progress from the last waypoint. I have tried a few things to no succcess. Any help would be great
     
    Stephen_O likes this.
  15. joeyether40

    joeyether40

    Joined:
    Jan 26, 2018
    Posts:
    20
    NeverMind... I found a way to do it. If you save nextWP in ChangeTarget() right after int check = nextWP and then change nextWP = 0 in the start to equal your saved data it works perfectly.
     
    Stephen_O likes this.
  16. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Awesome, I'm glad you were able to do what you wanted!
     
  17. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    Version 1.1.7 submitted.

    - Fix script error introduced by Unity 2019.3
    - Lower latest version requirement from 2019.1 to 2018.4
    - Removed some textures that were not required.
     
  18. chevidal45

    chevidal45

    Joined:
    May 15, 2019
    Posts:
    2
    Can I use this with 2D games? Im trying to replace the arrow with a sprite but it does not work
     
  19. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    It doesn't work with sprites, but if you use a 3D pointer it works ok. It would require a different type of positioning script to properly orient a sprite.
     
    Only4gamers likes this.