A week ago I started a thread about my pathfinding system which was soon going to be released, now the wait is over and it’s here!
The focus for the project is to create an out-of-the-box pathfinding system for Unity.
The script scans the environment on start-up so you don’t have to adjust everything manually.
Also the script can also take angles into account to avoid, for example mountains.
I don’t have an iPhone so I haven’t got a chance to try, although I can’t see any reasons why not (it only uses ordinary stuff, no weird dll’s and such stuff). If you try and make it work, please tell me so I can put it on the features list
Well alright, you have /Editor code that simply won’t run in Unity iPhone, as what appears in Unity 2.5 in the Inspector for your static object does not appear in Unity iPhone 1.5…
…that and the Terrain of course doesn’t work (obviously) so I guess this is a no-go all around.
Well, the editor code and the terrain aren’t really necessary, the script works just as well without a terrain and editor code (just make sure you set followTerrain to false if you remove the terrain). You can edit the script so all variables are exposed.
Although why doesn’t editor script work in Unity iPhone, isn’t that just the Unity app with added option for exporting for iPhone?
To bad the terrain doesn’t work on the iPhone, I though it would
Hmmm still no go…I didn’t dig into your script yet but I deleted the terrain, created a plane underneath the ‘set’ where the terrain would be, added it to the layer “Ignore Raycast” and set followTerrain to false and not a single thing happened or attempted to happen except the errors:
Assets/Standard Assets/Scripts/DragRigidbody.js(31,22): BCE0019: ‘isKinematic’ is not a member of ‘UnityEngine.Component’.
PhysicsSDK::releaseHeightField: instances of this heightfield still exist!
I’m sure more needs to be done but the fact that NOTHING happens doesn’t help me discover where to look next (unless the above errors do and I’m just a noob)
@Johan, The script just calculates a path from A to B, your car could use that, no problem. The script works everywhere when the environment isn’t changing so fast.
@Liverol, There are many solutions for pathfinding. My system does not (might be changed in the future) support avoiding other units paths (I have a beta code for it but it doesn’t work so well). I don’t know about a pathfinding system compatible with Unity which support avoiding other units.
If you meant just avoiding obstacles there is one more pathfinding system for Unity which I know about: http://angryant.com/
@SteveB, Well there is something wrong with your DragRigidbody.js script, solve that problem and then see if it works.
It’s not my script…it’s the one that came with your project…
…I don’t think iPhone likes isKinematic as I’ve seen this problem in other Unity 2.x projects I’ve tried opening/converting in Unity iPhone that have DragRigidBody.js ::shrugs::
Don’t expect you to help but if anyone else with more experience wants to give this a shot it would be a HUGE boon to the iPhone community simply because there are zero pathfinding solutions short of the very modest waypoints…
This error in particular is a strict typing issue… in this case, you have to tell Unity iPhone that the component you’re finding with GetComponent or whatever is a Rigidbody.
Ah very good…this in fact turned out to be a great lesson regardless if I can make pathfinding work or not, I NEEDED to know that this particular type of error was of the ‘strict typing’ nature.
Thank you SO much Alex for your initiative here as I’d otherwise just ignore the problem and move on, never learning of this. ::
…still need to convert it to touch input and such before I can test it on the iPhone proper.
Big shout out has to go to Alex again. He showed me what to look for and I cleaned up all the errors and it started working immediately. The beauty of teaching a man to fish…