Well, I think that my code is now in a state where it can be donated to the Skyline Community
I have made a (very) quick video that demonstrates "Seek", "Follow" and "Obstacle Avoidance":
There are 3 files that I have put together (the links are to my own OneDrive account):
1) the main code (AI Steering Code.lua)
2) comments on how to use the main code (AI Steering Code - Comments on Usage.txt)
3) some example onInit functions (AI Steering Code - example init functions.txt)
At the moment, the full AI code needs to be added to every entity that needs to use it, but this will change with the next update, when we will be able to "include" a lua file in a script.
The AI uses some of Skyline's physics functions, so all entities will need to have Rigid-Body Physics or the AI code will not work.
If you have any questions, or problems with implementing, let me know and I'll try to help.
Shando
PS: to turn on the "feeler" rays as shown in the video, just uncomment "physics.rayDebugLines" in the "aiObstacleAvoid" function.
PPS: the code is not commented, but hopefully should be relatively easy to follow.Statistics: Posted by Shando — 19 Mar 2015, 06:03
]]>