Moving a bot around a map

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
_Dum0nde
Posts: 24
Joined: Thu Mar 17, 2005 3:26 pm

Moving a bot around a map

Post by _Dum0nde »

Hi,

I would like to move the bots around the map just like the player. I want the bots to be under the effect of gravity and I want collisions to work...

I can't really add a FPS camera just like I do for the player... Is there any simple way to do something like GoForward(speed); with the models' node?
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

You'll need to calculate the Forward, Right and Up Vectors, or the vector for the positive Z local axis, positive X local axis and positive Y axis of the node. You may want to cancel out the Y axis, if the bot will always be standing upright.

FPS Camera code does this, and I think there may be something on the wiki at http://irrforge.org/index.php/Main_Page
Image
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

Image


I did something like this using Newton. In the picture above, the bots follow a path described by a bitmap. A poor mans waypoint system. In my case Newton did what you are talking about, because once you associate a Newton object with something, it kind of has a "existence" of its own in the simulation.

I haven't tried it, but I could tie a cameraNode to my bots and have a "Late Night Bot Cam"

So if I read your question right, one way to get what you want is a physics system with some kind of AI.
_Dum0nde
Posts: 24
Joined: Thu Mar 17, 2005 3:26 pm

Post by _Dum0nde »

Hmm... That's what I feared! I guess I'll have to learn Newton then :wink:
Post Reply