Advertisement

object tracking in 3d semispace

Started by April 16, 2009 12:23 AM
5 comments, last by Edge Damodred 15 years, 7 months ago
I am writing ai for a 3d acion game. Can anybody guideme how to track an object . i-e find it location.
Object.position? Uhh you are gonna be more specific. =)
Advertisement
Doble: Uno, Dos.
Are you meaning that you have a position where you character is at and you want your enemies to get to that location?

If thats the case you want to look at the A* algorithm

Here::A* For Beginners

This is a 2D example, but its easily converted into 3D.

If this isnt what your looking for, then you need to be clearer.
let for example there is an enemy character and a hero character . By object tracking i mean to say that how should i know that the hero charater has entered in the area of action of the enemy character. that is the eye contact.
Eye contact? That was a good keyword. Check out this article on line of sight (http://www.gamedev.net/reference/articles/article729.asp), line of sight (or LOS) means just that; eye contact.
Advertisement
One method would be to give your enemy some kind of view frustum to represent his own field of vision. This would be updated as the entity moves about. You would then test this frustum against the player's bounding volume to see if he's within the view. However this does present the problem of having the enemy see the player through objects if you just do this singular test. You can use certain occusion culling methods normally found in rendering to help with that. One in particular would be altering the view frustum similar to what's done when you use a portal system for geometry culling for rendering. It basically breaks the camera's frustum up into several smaller frustums by how they intersect various geometry so get a fairly accurate representation of what's in the camera's view. Not sure how resource intensive it is so I don't know if it would work for every enemy.

If you need a hack way and the enemies are stationary and you don't really need to have the player sneak around, there's the tripwire technique, where upon when a player intersects a certain bounding volume all enemies in an area are aware of him.
-----------------------Or, as I put it, MMORPG's are currently about attaining two primary things: strength and a shovel. The rest is you just shoveling sh** endlessly trying to get stronger to shovel more sh** so you can look for the next new shovel to shovel more sh** with. Once you are done, you can stand on top of a large pile of sh**, raise your golden sh** shoveler up high into the air and boast how proud you are to be the best sh** shoveler of them all. -Griffin_Kemp

This topic is closed to new replies.

Advertisement