Bots via gametype and angle/velocity question
Hey guys,
I've some questions.
First the (I guess) easy one:
I have a cVec3 with an angle, and I want my entity to fly a certain speed into this angle.
How can I convert the anglevector into an velocityvector?
And my other question:
Is there a possibility to spawn bots on a map even if there's no navigationfile for a map?
I simply want my bot to walk over some points I give them via addAIGoal() and I think that should work alot better if there's no confusing nav-file.
I've some questions.
First the (I guess) easy one:
I have a cVec3 with an angle, and I want my entity to fly a certain speed into this angle.
How can I convert the anglevector into an velocityvector?
And my other question:
Is there a possibility to spawn bots on a map even if there's no navigationfile for a map?
I simply want my bot to walk over some points I give them via addAIGoal() and I think that should work alot better if there's no confusing nav-file.
cVec3::angleVectors makes the conversion. The result you want is in
the "forward" vector. It's a unit vector, so you then just multiply
it by the speed you want to create a velocity vector.
The nagivation file is needed. The bot can't walk to the goals you create if there are no nodes, because it can't find the path to them. The navigation file doesn't include the map items, those are linked on map load just like the goals you add. If you want to make the bot ignore items (or whatever) just assign them 0 weight at updating the bot status.
The nagivation file is needed. The bot can't walk to the goals you create if there are no nodes, because it can't find the path to them. The navigation file doesn't include the map items, those are linked on map load just like the goals you add. If you want to make the bot ignore items (or whatever) just assign them 0 weight at updating the bot status.
Thank you for your help with my bot problem.
Do you mean something like this?
I am not completly sure if this is working, there has to be another error in my angel calculation... But this part is correct?
Do you mean something like this?
cVec3 dir;
newAngles.angleVectors(dir, null, null);
dir *= 400;
this.ent.setVelocity(dir);
I am not completly sure if this is working, there has to be another error in my angel calculation... But this part is correct?

