@MeaxisDev@Rocky28447
Any non-nil value can be used as a dictionary key. Even false, instances work, vectors, etc. And, recently, with the native Vector3 update, Vector3s (but not Vector2s yet) will work as table keys properly, so t[Vector3.new(1, 2, 3)] will always work, rather than being a whole new key each time the vector is created.
@MesmerizeDev Yes, you can replace 1.0 and math.huge with any values you want to (unless they are false or nil), its just an and/or chain. If canCrossDoor is true or any other truthy value you’ll get the value after the and, because the or comparison stops immediately once a truthy value is encountered. If its false (or nil), it simplifies to false or math.huge, so you get math.huge.
true and 1.0 or math.huge true and 1.0 = 1.0 1.0 or math.huge = 1.0
false and 1.0 or math.huge false and 1.0 = false false or math.huge = math.huge
Oh, last time I had looked up how to change agent size, this is what had come up in the search so I figured it wasn’t possible. Sorry for the confusion.
Actually, this would be perfect for a navigation system, by giving roads a higher priority and only straying off the path when absolutely necessary. What a great use case!
That aside, this is an awesome update that brings much-needed usability to the existing Pathfinding API.
Strings should make it easier to reuse the annotations everywhere.
For example, you could have water on terrain and PathfindingModifiers with ModifierId="Water".
PathfindingService will give them the same treatment and prevents defining the cost twice (once for the material enum, and again for the modifier).
The idea is that Water means always the same, regardless of how it’s set during level design.
Hello, I cannot find any navigational areas/ meshes in my game, I have a big map and need pathfinding, how can I add/ fix these navigational areas/ meshes?
Thank you for this, this has significantly enabled the ability to create pathfinding in places with NPC vehicles, cityscapes with NPCs only walking on sidewalks/crosswalks, direct AI control to prevent walking in places they shouldn’t, and more.
Many game features that were almost impossible to do so have now been made possible.
This is great, plathforming ai is some thing I want to try out some time, and something I will be putting in my future game. If I do get to the point where I do my game the ai has to be able to react to the player and, find cover to fight back
Just a question, do you set up pathfinding through a script or is there some option I’ve never seen before. (Basically just get it set up and started, I know scripting is a big part of itl