hakan.yuceturk Posted November 7, 2014 Share Posted November 7, 2014 Hi, I want to change pathfinding example in unigine to define points by myself and i use route_03.mesh for this.I can place the object(Dummy_Vehicle) in the mesh file,but it is not moving. Please help... Dummy_Vehicle.cpp Point_Usage.cpp Link to comment
unclebob Posted November 7, 2014 Share Posted November 7, 2014 Hello Hakan, Could you please upload your navmesh? I had a look at your code and have some suggestions: 1) It's not so useful to start update_scene thread in every frame so it's nice if you remove this or move to init function; 2) Try to set exclude obstacles to path route because your car is an obstacle and you're trying to calc path from inside that obstacle so it might not work as your expected; 3) It's better to use relative paths instead of absolute when you want to include header files. 1 Link to comment
hakan.yuceturk Posted November 7, 2014 Author Share Posted November 7, 2014 Hi Unclebob, thanks for your replay.You can find project files in the attachment.I want to give an points array and move Dummy_Vehicle with these points. Point_Usage.rar Link to comment
hakan.yuceturk Posted November 10, 2014 Author Share Posted November 10, 2014 Hi Andrey, I listened your suggestions but i can not calculate route so i add points continuously.Please help,you can find the last version in attachment. Point_Usage.rar Link to comment
unclebob Posted November 10, 2014 Share Posted November 10, 2014 Hi Hakan, Thanks for the files! Good news! I've managed to get this working well. The main problem was that your Navigation node wasn't prepared properly as it has to have a little bit more height so the car and the coin will be inside that mesh volume. Another problem was with your path checking code during set_availability call, it tried to get path route instantly which might not be ready right after the call. Also, I cleaned your code a little bit. Please find modified code in the attachment. P.S. I tried it to our latest engine build so if it won't work with your version of unigine that means that I forgot to change some stuff back. So please tell me about that it you'll encounter any problems. Point_Usage.zip 1 Link to comment
hakan.yuceturk Posted November 11, 2014 Author Share Posted November 11, 2014 Hi Andrey, Thank you very much for your help.It is perfect. Link to comment
unclebob Posted November 11, 2014 Share Posted November 11, 2014 You're welcome! :) 1 Link to comment
Recommended Posts