Hi,
My name is Aron Granberg and I live in Stockholm, Sweden.
I create games as a hobby on my spare time, but so far, I haven’t completed any of them.
I also try to learn 3d modelling, but it’s hard, the 2d side on the other hand works quite good, nearly all the textures in my latest game are made by me.
This website is mostly about my work in theĀ Unity3D Game Engine.
I have made a lot of small (unfinished) games, although most of them can not be viewed on the website.
You can view my projects at the Unity page.
Hi, I am just curious about your pathfinding module, and I made a new scene within you project, and copied all settings on the camera, seeker etc, but even though I’ve got the same terrain as the one you used, I only get a large coverage of red non walkable nodes, and I dont understand why this would be, could you perhaps give me some insights?
Probably you have missed the layer mask variables, you have to assign the terrain to a layer and then set the A* script to ignore that layer.
This looks / works amazing in the demo. However do I have to use a unity terrain? can I just use a plane / any object? Im playing with it now and understanding how it works so forgive the somewhat dumb question
Thanks dude
Sure, you can use any object you want, anything with a collider attached.
hi Aron,
I would like to be able to set the offset of the grid and to rotate it at different times during the game (not only on awake).
I was able to set the offset, but I can’t figure out how to set the rotation.
I’ve tried setting the navmeshRotation, but that didn’t have any effect. could you tell me how I can do that?
thanks for the amazing code : )
karolina
Hi Karolina
That is not possible currently, all the positions are generated in the Scan function and are not changed during runtime, and only the mesh mode has support for rotations (that’s the navmeshRotation variable), I think I will expand this to the other grid generators later though.
You could however code a small function which iterates all nodes and adjusts their positions, there are a lot of examples of iterating the staticNodes list (all nodes) in the Scan () function.
Hi Aron, are you able to re-scan (grid-based)at runtime to account for new obstacles that may be place in levels? Thanks! Awesome code, you should definitely definitely refine it more.
Likewise, with meshes, I continue to find the issue no nodes are walkable once I scan the mesh. Any ideas? It’s nicely lined up but won’t switch out easily for me into the current grid setup I have.
Bryan
Hi Bryan
Sorry for not responding for so long : (
1. Sure you can, just call AstarPath.active.Scan (), however this might cause the game to freeze for a second, so I recommend that you use the built-in functions for modifying the grid (supposing you are using the ‘Grid’ or ‘Texture’ generators, you can call SetNodes () to change the grid, an example can be found in the Clicker.cs script in the example project.
2. Check the FAQ page, I have covered the issue there.
Hope this will help you, and again, sorry for not responding.
Regards,
Aron