Path following AI
-
In sketchyphysics
Just thought I'd make anyone who hasn't recently graced the WH aware of this. I've developed a system that lets cars (or boats) drive themselves around a course. It supports multiple routes, and multiple vehicles very easily, and there's a detailed tutorial for installing it on models. I'll be building on top of this basic system to allow more complex behaviours, and the tutorial and up-to-date info can be found at:
http://sketchupusers.freeforums.org/easy-ai-now-with-tutorial-t73-10.html#p945 -
Thank you, I render videos from time to time so it'll be totally worth to learn how to do this.
-
Very nice - Cool
Could be nice to have a tool bar for more easy use.
The "nodes" could be in flag shape, and outomatically named ect...
( set to "ignore" )Thank you
David.
-
Toolbar... ok, here you go:
AI Tools.zip
Same deal as normal plugins, unzip in your plugins folder. To register a vehicle as AI, select all parts, including hidden parts, and use the 'Set AI' tool. To auto-number your nodes, create them in order (that's important), select them all, and use the 'Number route' tool. It removes existing numbers in the name, so you can re-use the tool, after adding extra nodes, for example. -
WOW !!! - It is beautiful - incredible model !!!
Still need more instruction on how to use the Toolsbar for all the tasks.
I am missing the tool for inserting the script to the "floor" and seting the motors control.P.S.
I don't understand the name AI - what does it stend for?
Nice job !
Thank you. -
AI... Artificial intelligence. Just the sweeping term for computer-controlled opponents, the main intention of the system. With the floor, you need SP3 X Apr2 or above, and the 'ontick' field will be visible under properties in the UI, with an object selected. Just copy/paste the main code from the tutorial into there. I found out how SP stores the ontick scripts though, so I could automate that as well. Setting the motor controllers, again, in the UI, paste the command into the motor's controller field.
And you're welcome
-
Hi Wacov
I think I did every thing correctly
Could you check why the Red car does not move correctly?Thank you.
david.
-
Looks like you didn't register all parts of the car... select everything, every part of it, including wheels, steering assembly, everything with an AI-controlled joint inside, and use the AI registration tool. After that the axes of the car are wrong, but that's easily fixed, and covered in the tutorial.
-
Didn't work
Could you post a working demo done with the tut?
same model a little bit cleaner
Thanx. -
You presumably exploded and re-grouped the main body, so its ontick field is empty
Here's a couple of example models, they both use slightly outdated code though:
http://sketchup.google.com/3dwarehouse/details?mid=63cfe4da6cd759a3d36844afc91c4691
http://sketchup.google.com/3dwarehouse/details?mid=5cba40fd49a9606c6cd8ad826e9017b8 -
Wacov
I took your model and replaced the parts inside with the ones in my model.The only problem now is to make my Track "Obey the traffic laws"
Well - I would like it to stay in the correct lane....The problem is I do not understand what is going on.
It would be grate if you could explain what I should doAI Red Track
P.S it takes about 15 seconds to start after I press run - Is it normal?
Thank you.
David.
Advertisement