Movement in a quake3 map

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Eric the half a bee

Movement in a quake3 map

Post by Eric the half a bee »

Hello. I am trying to populate a quake3 map with a VERY basic bot, which will roam aimlessly around the castle. I have tried to think of a way to do this, and am stuck. All I can come up with is to continuously loop through a series of two waypoints, the first of which is the the models position at the time of starting the iteration, and the second of which is randomly generated. However, this poses the problem of gravity, for if the destination waypoint is hovering in space, then the bot appears to climb the invisible staircase I am growing to hate with a passion :evil:

Any suggestions?

Eric
deps
Posts: 115
Joined: Sat Jan 10, 2004 5:22 pm
Location: Tranås, Sweden

Post by deps »

Make the second waypoint a mesh with gravity. and turn visible to off.
Now the mesh will fall to the ground, and the bot can reach it without climbing in mid-air.
Or something like that. :)
Eric the half a bee

Moving around a quake3 map

Post by Eric the half a bee »

Thanks for the tip, but the only way to move a node that I know about is to use the createFlyStraight, createFlyCircle, and createRotation Animators. These only take core::vector3df s as parameters, not meshes, so I don't know how I would do as you suggest. Are there any other mechanisms for moving a node?

Ta

Eric :shock:
deps
Posts: 115
Joined: Sat Jan 10, 2004 5:22 pm
Location: Tranås, Sweden

Post by deps »

Well, my idea would not include animators, but sin, cos and other funky functions.
Keep rotating the bot until it faces the target waypoint. Use sin and cos to walk forward.
I'm doing almost exactly that in my current game project.

I dont know any other way, but i'm new to irrlicht. :)
Boogle
Posts: 162
Joined: Fri Nov 21, 2003 3:16 pm
Location: Toronto, Canada

Post by Boogle »

Create a new Animator and give it a pathfinding AI with a state.. :)
qwe
Posts: 112
Joined: Sun Dec 28, 2003 12:54 am
Location: Oregon, USA

Post by qwe »

using animators results in a much smoother movement rather than directly modifying the node's position.
Post Reply