AI Random Wander

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 114

  • @OneWheelStudio
    @OneWheelStudio  6 лет назад +10

    Looks like I forgot a step in order to be able to add the "nav hit position" unit to the flow graph. Here's a link to the missing step: ruclips.net/video/AGrkJMg0E3A/видео.html

    • @nightglow998
      @nightglow998 4 года назад +1

      oh thank god, i was worrying about what i did wrong

  • @nootix
    @nootix 5 лет назад +1

    These video tutorials are getting better all the time as this serie progresses. Can't wait for what is to come and thanks for doing these Bolt videos!

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад

      Glad you're enjoying them. I am slowly figuring out how to make better videos :)

  • @josemarcano6591
    @josemarcano6591 4 года назад +1

    DUDE YOU ARE THE BEST! Thanks for making this video!!

  • @ReinkeDK
    @ReinkeDK 6 лет назад +2

    Thanks, learned a lot from this and the other videos about Bolt

  • @aleph618
    @aleph618 5 лет назад +2

    Thank you for this. I'm currently resurrecting a two year old project and converting it from Playmaker to Bolt. It has wandering zombies in it and I think I created them using your old Playmaker tutorials.

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад

      Awesome. Would love to hear about your transition from PM to Bolt. Is it working for you? Pros and cons?

    • @aleph618
      @aleph618 5 лет назад

      @@OneWheelStudio It's very early days but I'm enjoying it so far. Bolt definitely has more of a learning curve than PM. Converting FSMs to Flow Graphs has been a good way of getting a better understanding of it. As a beginner it's also really satisfying when you do something without a tutorial or guidance and it works. As an example, I had to adapt the graph from your tutorial because I'm using physics to blow up my Nav Mesh Agents so I had to build a check to make sure they're back on the NM before setting position. I also had to replace remainingPosition with some old fashioned maths because it was causing errors when my agents were off the NM.

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад

      @@aleph618 I had to slow down and introduce a new project for my class due to the steeper learning curve of Bolt, but the payoff is also better and totally been worth it!
      Figuring something out on your own is MAGIC! It's pretty damn addictive - or has been for me.
      If you're looking for help make sure to jump on the Bolt discord it's pretty active (or come over to my smaller and quieter one too).

    • @aleph618
      @aleph618 5 лет назад

      @@OneWheelStudio You're right, it's very addictive. I have a very logical brain so plugging in nodes and seeing them work is brilliant. I had a quick look at Game Grind's platform tutorial and I'm looking forward to going through your Top Down series. The discord is great and very helpful, although it moves pretty quick sometimes.

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад

      For the "logical" brain Bolt is pretty perfect. You can puzzle your way through to a solution with a lot less fuss that traditional coding and the units in Bolt are pretty clear as to their function compared to PM.
      A downside to Discord is definitely the face paced nature of the chat. It's a pretty slick platform but an old school forum still has its place.

  • @justsomeone64
    @justsomeone64 4 года назад +3

    You’re a gem 💎

  • @rosannaquist35
    @rosannaquist35 3 года назад +2

    I dont know if anybody is ever going to see this comment.. but I've been struggling trying to get my "AI" to move. When I press play the Character stays 100% still in its starting position.
    I'm guessing I need to add things in the animator or player controller but I dont have any animations to use for the walking or idle and I was wondering if thats neccesary to make this script run?
    Sincerely, an inexperienced programmer who is fairly close to breaking down into tears

    • @OneWheelStudio
      @OneWheelStudio  3 года назад +1

      This stuff can be so frustrating when you start! Sorry about that.
      Have you watched the other videos in the playlist? ruclips.net/p/PL7S-IAgf3dlVjaa0i7eCYbMlEpzCYk7ag If not you might want to start there as they definitely build on each other.
      The animations shouldn't be necessary for your character to move. My first question would be did you bake the navigation mesh? If so does it show up (it only shows up when the navigation tab is open and on top) and is the character on the mesh?

    • @rosannaquist35
      @rosannaquist35 3 года назад

      @@OneWheelStudio I'm trying to apply this into a project of my own (Making an Ímmersive story game for school) , so I'm not using the Assets you included.
      The character I'm trying to use is only a mesh on itself right now. It doesnt have a controller or animator. (That's probably the issue but I simply dont know what to add)
      I do have a player which can move around freely with WASD keys.
      I watched your run and idle video, but since I don't have animations or a controller for my character, I couldnt really think of what to do with the information.
      I have baked the navmesh, its just a regular plane for now, without any obstacles. Although I'm pretty unexperienced with the navmesh making and using, I don't think thats the problem.
      PS: WOW~! you reply faster than my teachers do

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      I sometimes forget to answer my students emails too :)
      Any chance you could slide over to the OWS discord? A screenshot of your code (in playmode so I can see the values) while it's running could be really helpful. It might be an easy fix or take a bit more work. Things these are tricky to debug without seeing the code.

    • @rosannaquist35
      @rosannaquist35 3 года назад +1

      @@OneWheelStudio I've joined the discord! In what channel should I post?

  • @insomevitya
    @insomevitya 3 года назад +1

    Hi! I have followed the video, it seems to be working, but Nav Mesh Agent Hit section is just completely missing in my Bolt. What could be the issue? Thanks

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      Yep. I missed a step. There is a video covering it ruclips.net/video/AGrkJMg0E3A/видео.html
      You can also find the entire playlist with all the videos on the channel page 😀

  • @PrismaCube
    @PrismaCube 3 года назад +1

    Hello, I was wondering if it is possible to add a Min Distance I want the AI to wander? Right now I can only add a Max Distance but if I want the AI to walk more larger distances and almost no small distance I can't seem to get anything to work. I've tried around a bit now but maybe you know of a better way. Other than that, great tutorial helps alot :)

  • @tyresehague1915
    @tyresehague1915 4 года назад

    For some reason my sample position is false. Is there any reason this could be?

  • @spiidermonkeyy3568
    @spiidermonkeyy3568 3 года назад

    7:32 what do i do if navMeshHit doesn't show up?

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      Check out the "missed step" video on the playlist ;)
      ruclips.net/p/PL7S-IAgf3dlVjaa0i7eCYbMlEpzCYk7ag

  • @anandjoshi5364
    @anandjoshi5364 4 года назад +1

    Great Videos. I'm stuck here, not able to get the navmesh hit options when I extend it from SamplePosition. Version - 2019.4

    • @anandjoshi5364
      @anandjoshi5364 4 года назад +1

      Didn't see your first comment. Got it. Thank you. 👍

    • @OneWheelStudio
      @OneWheelStudio  4 года назад +1

      Was just going to send a link! Glad you got it.

  • @alejmc
    @alejmc 6 лет назад +3

    This video is great both for Bolt usage learning and Unity built-in nav mesh handling. Thanks a lot for sharing this
    Curious to see how to handle the Any State transition issue where the state that was active kinda stays active...

    • @OneWheelStudio
      @OneWheelStudio  6 лет назад +2

      It’s pretty easy to use. Just has any active state exit and makes the transition. It does have a known bug, but I’ll show how to get around 😛

  • @pressupstudios
    @pressupstudios 3 года назад

    Hey! I'm having some issues with figuring out how to actually make the guy work, everything is correct but he won't move at all. Are rigid bodies and issue? Should I keep the box collider I have on him? (Don't know if you'll even see this because this vid was uploaded 3 years ago)

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      Rigidbodies could be an issue. They need to be set to "isKinematic" otherwise the physics engine and the navigation system fight about who is in control.

    • @pressupstudios
      @pressupstudios 3 года назад

      @@OneWheelStudio I fixed the rigid body system, but he still doesn't move around and I have a feeling it has something to do with the Nav Mesh Agent, but I don't exactly know what to do with it. I'm a little new to Bolt and Unity as a whole and I'm coming from working over on Game Maker and Unreal. Sorry if I don't know all my terminology yet. Thanks for helping out.
      Edit: I actually think the problem is different now, the set destination function doesn't accept to true or false from the branch. If you could help me out with figuring out how to get this working in a 3D space, that'd be great.

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      @@pressupstudios Do you mean actually moving in 3D space? If so the nav mesh system only works in 2D - or at least on surfaces.
      If not, is there an error being thrown? Is there a unit in a flow macro that is red?

  • @greenviewmedia6186
    @greenviewmedia6186 4 года назад +1

    Question: So i have the flow working properly, but it keeps giving me an error about the Nav Mesh Agent. I don't recall the step of adding the Nav Mesh Agent directly to the AI object (All the flow elements are the same as yours.) I was just wondering what your settings were/naming of the Nav Mesh Agent on your AI? Thanks!

    • @greenviewmedia6186
      @greenviewmedia6186 4 года назад

      @@knifedreamer I've just gone to learning C# as is without bolt via the "Creating with Code" unity tutorials; so i didn't find the answer unfortunately. Sorry!

    • @knifedreamer
      @knifedreamer 4 года назад +1

      Greenview Media - Thanks I figured it out haha. Already forgot how tho 😅 This stuffs tough

    • @greenviewmedia6186
      @greenviewmedia6186 4 года назад

      @@knifedreamer you are a greater man than i lol. Well done sir! (and yes, remembering the process is not an easy task lol)

  • @amitkumarxa4815
    @amitkumarxa4815 3 года назад +1

    Its not working showing error in nav mesh mask and nav mesh set destination

    • @amitkumarxa4815
      @amitkumarxa4815 3 года назад

      Help

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      What do the errors say? Any chance you forgot to bake the nav mesh?

    • @amitkumarxa4815
      @amitkumarxa4815 3 года назад +1

      @@OneWheelStudio thanks so much, you are the best I got frustrated in search of enemy ai, but today I got it. Thanks ❤️❤️. Love from teen-ager

  • @antondingir884
    @antondingir884 4 года назад

    I would add to that 1 thing:
    If Navmesh SamplePosition block false to hit anythin then connect that to -> cooldown timer reset
    This way he will be a little bit smarter and wont stay for long waiting to fire "search new point" logic, and you can make "navmesh hit buffer" smaller so he will not get stuck to a wall for too long.

  • @animationstudio1949
    @animationstudio1949 Год назад

    The Nav Mesh hit Position Get doesn't appear in the Unity 2021.3.8f1 ver. I also use visual scripting instead of the Bolt. Does anyone know why it cause the problem and how I can fix the problem?

    • @OneWheelStudio
      @OneWheelStudio  Год назад

      Try this: ruclips.net/video/AGrkJMg0E3A/видео.html

  • @JkouFiles
    @JkouFiles 5 лет назад

    im stuck at 7:31 My Area mask (get) and set destination Units are yellow. Do i need to create a nav mesh in my game?

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад

      Definitely need to have a nav mesh. I’m not 100% sure that’s the issue but it could be. Give it a try. Let me know if it doesn’t work.

    • @JkouFiles
      @JkouFiles 5 лет назад

      I added a navmesh to a plane and attached navmesh agent to my ai model and its ok now

    • @JkouFiles
      @JkouFiles 5 лет назад

      but now i don't see the options for navmeshHit

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад +1

      @@JkouFiles I missed a step in the video, here's a short video explaining what I skipped: ruclips.net/video/AGrkJMg0E3A/видео.html

    • @JkouFiles
      @JkouFiles 5 лет назад

      ruclips.net/video/AGrkJMg0E3A/видео.html your video clears this up. i'm supprised i ran into it by accident

  • @Jeea84
    @Jeea84 3 года назад

    This is so easy to understand!!
    Can this be mapped on for a 2D game? Can you tell me what to replace NavMesh with?

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      I haven't done any path finding in 2D, but maybe this brackey's video can give you a head start? ruclips.net/video/jvtFUfJ6CP8/видео.html

  • @Stinger-rq4gy
    @Stinger-rq4gy 3 года назад

    new vector 3 does not come up in the fuzzy finder at all?😑😑😑😕😕😕😔😔😔😔
    I am using the newest version of Bolt Visual Scripting.
    looked for it all over, I cannot complete your tutorial without that.

    • @OneWheelStudio
      @OneWheelStudio  3 года назад +1

      The fuzzy finder can be pretty picky. Try searching for just "vector 3."

    • @Stinger-rq4gy
      @Stinger-rq4gy 3 года назад

      @@OneWheelStudio Thank you ill try that🙋‍♂️🥳🥳

    • @yasuri9701
      @yasuri9701 3 года назад +2

      @@Stinger-rq4gy it's been two months but anyway, if you still need this, try to search for "create vector 3", it's the same thing

    • @Stinger-rq4gy
      @Stinger-rq4gy 3 года назад

      @@yasuri9701 thank you.
      Do you want to team up on my app FPS game, and do you want to team up, and share tips and tricks as we learn Unity 3D, C# Microsoft Visual Studio, Bolt Visual Scripting, and Blender 3D? We can help each other problem solve to try to find something we can't do in Unity 3D, Blender 3D, C#, and Bolt Visual Scripting.
      Game development can be a lonely, confusing, brain hurtin🤕 journey. Let's walk through this desert together as a learning team.🏜

    • @yasuri9701
      @yasuri9701 3 года назад +1

      @@Stinger-rq4gy I feel you, it's really confusing and brain hurting, but sorry, i'm not really into game development, it's just a little temporary hobby for me, and also i'm not a team person, i like to do things alone. Hope you'll find someone someday, wish you luck

  • @justanother0ne647
    @justanother0ne647 4 года назад +1

    I followed every step & double checked everything is accurate but im getting an error saying the "get remaining distance" can only be called on an active agent that has been placed on a navmesh. Im stuck.. (Edit) I even tried this script on terrain... Any idea's.

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      Have you baked the nav mesh? Is it possible the object with that code doesn't have a nav mesh agent component? Or could that object not be on an actual nav mesh, i.e. not on the terrain?

    • @justanother0ne647
      @justanother0ne647 4 года назад

      @@OneWheelStudio Do you have any videos on nav mesh? Id be glad to watch. I've been trying to simulate zombies in my game for awhile now😂 The object that contains your code is a cube. Does a cube work with your code it has a couple components like rigid body so i can kick it around is that a problem? Does a terrain have a nav mesh built into it? And if not how do i bake a nav mesh? Im new to nav mesh in general😥

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      @@justanother0ne647 The start of the video series looks at adding in the nav mesh (link) below. As for using a rigidbody with a nav agent, that is tricky as they will both being trying to control the location of object and they will tend to fight - so either not a good practice or one you have to carefully work with. A terrain does not have a nav mesh baked into it.
      Playlist: ruclips.net/p/PL7S-IAgf3dlVjaa0i7eCYbMlEpzCYk7ag

    • @justanother0ne647
      @justanother0ne647 4 года назад +1

      @@OneWheelStudio Ok awesome ill look into it. Thanks for the help bro. I've been teaching myself how to use unity😌 just trying to make a simple 3d zombie game. Ill update you if i figure it out or i need any help. Thanks again.

    • @justanother0ne647
      @justanother0ne647 4 года назад

      @@OneWheelStudio Ok amazing i baked my nav mesh now i have one problem. My vector 3 wont connect to the multiply A port... It only connects to the A x E port.. Any ideas. Btw its a vector 3 set. Not a new like yours because when i typed in new vector 3 nothing popped up.. Any help would be appreciated❤

  • @slavbruner2327
    @slavbruner2327 4 года назад

    Why would my update node not update every second? Followed the tutorial step by step but for some reason it won't work.

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      Don't want to be too literal, but update should run every frame not every second. Is the issue it's not running at all? If it's not running at all, I would double check that the flow macro is assigned to a flow machine and that the flow machine is enabled. If that's not the case, can you give a little more information about exactly what's happening?

    • @slavbruner2327
      @slavbruner2327 4 года назад +1

      @@OneWheelStudio Yeah sorry, every frame*. Wasn't focused there for a second.
      It wasn't running at all.
      I double checked, and it's working now. Thanks a lot for the help! :)

  • @djjjo6130
    @djjjo6130 3 года назад

    I followed the tutorial and my object isn’t moving
    Idk what to do. Plz help

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      Are there any errors or warnings shown?

    • @djjjo6130
      @djjjo6130 3 года назад

      @@OneWheelStudio it said no valid NavMesh

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      Ok. Did you bake the nav mesh? Can you see the nav mesh?

    • @djjjo6130
      @djjjo6130 3 года назад

      @@OneWheelStudio I didn’t. How do you do that?

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      @@djjjo6130 I'm not sure why YT has stopped showing the playlist... But check out the first video in the series here: ruclips.net/video/TmKqVmOT9ZM/видео.html

  • @bonvoyage8173
    @bonvoyage8173 4 года назад +1

    by the way which one is npc

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      I'm sorry I'm not sure I understand what you are asking? Are you asking with object is the NPC?

    • @willpace9556
      @willpace9556 3 года назад

      @@OneWheelStudio Hello I am also stuck on this. Your NPC object appears out of nowhere at beginning of video(Is it a copy of the main player from previous videos?). No clue where it came from lol, just literally it wasn't there and then video clips to it being there. I tried to mimick what I can see of your NPC object setup but no luck getting mine to move by the end of tutorial.

    • @OneWheelStudio
      @OneWheelStudio  3 года назад

      @@willpace9556 Check out the whole playlist, the earlier videos show the progress. :)
      Playlist: ruclips.net/p/PL7S-IAgf3dlVjaa0i7eCYbMlEpzCYk7ag

  • @Stinger-rq4gy
    @Stinger-rq4gy 3 года назад +1

    Awesome thanks this is what i'm lookin for😄😄😄😄😄👍👍👍👍

  • @adambamford5894
    @adambamford5894 3 года назад

    Thanks so much for this, I'm working on a lego project and this is a great start for cantina style AI! If I wanted to have it so they never stopped still and always kept moving, is there an easy way to do that from this? (Edit: Nevermind I figured it out!)

    • @OneWheelStudio
      @OneWheelStudio  3 года назад +1

      To keep the guys moving I think you can just get rid of the cooldown. You'll still need the part where it checks the remaining distance, but if you get rid of the cooldown (and random range) I think you'll get the effect you're looking for.

    • @adambamford5894
      @adambamford5894 3 года назад +1

      @@OneWheelStudio thanks, they’re strolling around great now, brilliant tutorial!

  • @afterparty0069
    @afterparty0069 4 года назад

    Does this work with a 2d platformer, if not, what would i have to change?

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      I've done almost zero with 2D in Unity. That said I think most if not all of it should transfer to 2D.

  • @justsomeone64
    @justsomeone64 4 года назад

    I’ve never used a nav mesh agent before. The console keeps saying “Failed to create agent because there is no valid NavMesh
    Please help 🙏

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      Sounds like you may need to bake the navmesh. Or if you've done that maybe nothing in your scene is marked as static so the navmesh isn't being created?

    • @justsomeone64
      @justsomeone64 4 года назад

      @@OneWheelStudio I'll have a look, like I say I've never used a navmesh so Probably one of the two.
      Thank you for replying 🙂

  • @monkeyrobotsinc.9875
    @monkeyrobotsinc.9875 4 года назад +1

    epic. oh sorry. unity. unity good stuff

  • @SuitedFlame
    @SuitedFlame 5 лет назад +3

    Im stuck on NavMeshHit, I cant find it anywhere
    (Edit) Never mind, your amazing with this. Thank you

    • @OneWheelStudio
      @OneWheelStudio  5 лет назад +1

      Yeah. Sorry about that. Forgot a step. Here's the video showing the missing step :) ruclips.net/video/AGrkJMg0E3A/видео.html

    • @SuitedFlame
      @SuitedFlame 5 лет назад

      All Good, Thank you

  • @pb_sandwhich
    @pb_sandwhich 4 года назад

    Just a bookmark 7:32

  • @tsunderenekokun
    @tsunderenekokun 4 года назад +2

    it didnt work lol

    • @OneWheelStudio
      @OneWheelStudio  4 года назад +1

      Happy to help if you could be more specific?

    • @tsunderenekokun
      @tsunderenekokun 4 года назад +1

      @@OneWheelStudio when i tested it on play mode i got a console message that says "GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh.

    • @OneWheelStudio
      @OneWheelStudio  4 года назад +1

      @@tsunderenekokun Hmm. Sounds like the object the flow graph is on either doesn't a nav agent (or it's not turned on) or the object isn't on a NavMesh

    • @tsunderenekokun
      @tsunderenekokun 4 года назад +1

      @@OneWheelStudio i have a navmesh agent but i dont know how to play a object on a navmesh.........................

    • @tsunderenekokun
      @tsunderenekokun 4 года назад

      i mean it has a navmesh agent compoment turned on but idk how to place an object on a navmesh

  • @hugoraguin4636
    @hugoraguin4636 4 года назад

    Please Please Please do that for 2D games

    • @OneWheelStudio
      @OneWheelStudio  4 года назад

      For those who come along later (we answered this on Discord) this video (not mine) takes a look at using the nav mesh system in 2D with Bolt (and C# and Playmaker too). ruclips.net/video/SDfEytEjb5o/видео.html

  • @zaam231
    @zaam231 6 лет назад +1

    First ^^