Hello, I've released the 2.0 version of UnitySteer. It's a complete reorganization of the one released over a year ago, and you can go to this article to find the architecture changes. While the old examples at the site will remain, I've also added a new example with multiple agents, using several behaviors and displaying some of the agents' steering plans. Cheers,
This looks absolutely fantastic. I was moving in the same directly with a project of mine (regarding the structure). I have to check this out, because it's looking like a masterpiece! Great work Arges
Nice, I got some nice behaviors with the old version, but ultimately, it was bit hard to actually force them into doing something, hope this new version obeys better xD
Just tested this on an ordinary Nvidia 8600 GS which is a fairly low-end graphics card implemented in laptops and some desktops a few years back, and it's running midway between choppy and smooth, probably around 18 FPS. It's actually not bad considering the amount of characters. I suppose though if that scene had an LOD implementation for the characters it'd run fairly decent! I haven't tried out UnitySteer prior so I've a couple of questions if you don't mind. This primarily only deals with object avoidance, right? Like in this example there's just some random script implemented saying "walk around this scene", and with UnitySteer, it avoids static and other dynamic objects. I know with some other solutions such as A* or Path they don't really take into account dynamic objects when you say "move from point A to B", so this is very attractive indeed. How easy is it to implement, for example, giving a character a goal of walking from his current location in the world to another at location X,Y,Z in combination with UnitySteer, e.g. use it alongside Angry Ant's Path. Also, how does it handle terrains? So like to avoid walking into high cliffs etc.
One thing is pathfinding, another is obstacle avoidance, pathfinding can avoid static obstacles by pathing around them, not by knowing they exist during unit movement (unless more costly real time versions but thats another story). As for using it alongside angry ants path, you should check the code inside, the old version had a ready to use plug and play script for it to work directly with Path. Right now I have it working with Aron Granberg's A*. This version doesnt seem different from the one I had previously, I didnt need any code modifications or anything modded actually, i just drag and drop and it worked, also didnt notice any difference in behavior, still doesnt quite work as I need it to, need to work more on it :/ One thing I notice is that sometimes some units wont move while others will : I have a infantry unit composed of 4 members, and those 4 members, each is a vehicle, they have pre-defined "hotspots" that they try and follow with a priority of 1 (other behaviors have priorities acordingly), those hotspots are moved with my rules for movement (using A*, speeds,etc) and the movement of the vehicles are controlled accordingly also. So, sometimes, when I move my hotspots, some units will follow it, and others will stay frozen behind, other times, one unit will wonder off while other units are on the correct positions. Maybe the movement behaviors are too strong or too soft, dont know, what you think Arges?
It deals with steering in general, with behaviors that can be: Go to that point Wander around Avoid static obstacles Avoid moving vehicles Flee that pursuer! Follow that cab! Walk in the same direction as those guys, trying not to leave them behind, but don't get too close Or any other behavior that deals with, in general guiding a vehicle by controlling its speed and facing Behaviors can be trivially combined, and new ones can be easily written. Path itself is trivial to integrate, as UnitySteer already includes not only behaviors for following a path, but a class to convert those paths returned by AngryAnt's library. UnitySteer 2.0 hasn't been tested with Path yet, however, as Emil is in the process of updating Path. Like SilentWarrior mentions, that's better handled as a function of pathfinding by something like punching a hole in your navmesh. You could mark the mountain as an obstacle, but if you simply pathfind around it you'll get better results.
You were probably using one of work-in-progress updates I've been doing in the past few months. Start off by setting the inspector in Debug mode, as this will allow you to see the force that each behavior is contributing to the vehicle (the Force property). That will likely give you an idea of where to look. Do check that you're not disabling the behaviors by any other mechanism - for instance, in our game I control the behaviors and vehicle via a behavior tree, for better tuning of the character actions.
Right now, I am just trying stuff out, so, I have at least 6 different ways of moving a unit, also 2 different unit types : tanks and infantry. Tanks should only be able to move in one direction vector, forward or backward, but rotate as needed (rotation if higher than 30 degree require full stop). Infantry can move in any direction except up/down, but, they should rotate towards the place they are going, if they are going to be moving there longer than 2 secs (normally if distance higher than 10 meters, rotate towards it, unless shooting at enemy). Its an RTS game, so, the movement can be a big jerky if it cant be avoided, but generally should be as good as possible without having congestions (the bane of RTS games). So, what i am doing is, for infantry, I have mid tier script that interfaces the movement requested by unitysteer with a charactercontroller that has already code to control animations and what not that make the character animate properly (using locomotion for example, will probably be replaced later). The tanks are moved using a script that tries and simulate the engine with gears, and overall forces, and moves using wheel colliders. A different movement method just treats the tank as a box and drags it around (this works better atm :/ ). As for tanks, they seem to be working properly but are a bit jerky because of the interface, where unitysteers makes small ajustments of +5 forward to -5 backward, the tank shouldnt care about it, but, its rotating totally (mistake on my part), but, i have to find a way for unitysteer to take into account the limitations on movement of the tank, and gauge the need for the tank to move against the units around it, for example, infantry is smaller and can move in more directions (more agile) than the tank, so, in most cases it should be the one to move, but, sometimes, if units are on the move, they normally have more priority and shouldnt be affected too much, and just do a large arc around the tank to move faster. Also, I have to make changes to make unitysteer apply forces instead of transform movements, so a single infantry unit doesnt drag my tanks around, but, with that, unitysteer must take that into account and compensate for it. But other than that, i have to find a way to filter some jerky movements that unitysteer requests, so that, my units arent always on the move, but, will only move if actually theres a need for it. Maybe something with weights or effort type system, where it will only move if the requested move action is worth the effort for movement, effort beeing controlled with stuff like how good of a protection my current location gives me, against the one that is 5 meter away (essentially the same location, but less optimal).
I asked this steering library in another engine forum however no one interested, I am happy I switched to Unity as this forum is awesome. Thank you so much.
Is documentation anywhere regarding UnitySteer? Even where to set it up or FAQ or best setup practices. I downloaded both the UnitySteer library and the UnitySteerExamples. And the Examples just crashes Unity when I try to load: Creating directory library/metadata/00 failed. The crash can be resolved by creating empty missing folders. But in the end the examples fail to run with lots of missing this and that. I have no idea where to place the UnitySteer library relative to my project. Please advise. Thanks, Jason
Jason, There is no tutorial yet beyond the examples, as we're tied up in our own game. If you're getting lots of missing this and that after checking out the github samples, getting the whole project from here might help: http://www.arges-systems.com/articles/48/unitysteer-20-released Are you using Unity Pro? If not, that would explain the troubles you're having. Basic Unity does not support external version control. Cheers,
I'm getting around 12 FPS in the 77 character demo on an old nVidia GeForce 7100/nforce 630i. Not bad lol :L! Also, it might be wise, i think for future releases, launch it as a unitypackage file, rather than us having to download the whole project and make a package from that.
Hi Ricardo, I believe I'm using Unity Pro (still under the 30 day license). I did get the project from github via the zip download. Are you saying that the zip is significantly different than a straight pull from github? Thanks, Jason