Advertisement

FPS Navigation

Started by January 13, 2005 03:54 PM
5 comments, last by Nice Coder 19 years, 10 months ago
Hi there, i just want to know if there is a fast way of letting the AI know there is a corner approaching in front of it... be it left or right. Just that. Without nodes in the map, or external map information. I was thinking of tracing a ray that detects an abrupt change in distance. What is possible?
Mecha Engineer (Making Real Humanoid Suits)
You might want to check one of the flocking demos at...
http://www.red3d.com/cwr/steer/
Maybe wall following or Obstacle avoidance?
Advertisement
you could check for silhouette edges, and look for ones that are vertical. I imagine it wouldn't work in all cases, especially if the turn was gradual, but it would give you a cheap approximation (if you are doing shadow volumes, you'd have ot calculate those silhouette edges anyway, so it's basically free).
Yes, but theres is an easier way.

You trace a ray, strait on the wall (not touching),
When the or the ray intersects with the wall, or leaves the wall, (gets too far away) you have yourself a corner (it doesn't matter what angle it is, it will find it.).

Its pretty simple actually...

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Straight on what wall? You first have to choose an angle to shoot rays out to find walls, and then decide if that is the right wall (and if not find another wall) and if so then finally you can trace along the wall.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
well, I can use that :D the basic idea is to make an AI which has interconnected ideas of events in its memory. For example if it finds ammo it stores it as an event then it walks and finds a door so it registers a door, goes further straight and finds a corner and makes a random turn there so it stores the corner. BUt it encounters an enemy. Fires, and runs out of ammo so it runs back to find a corner, it knows it has to make a turn there because of his memory and remembers it needs to find a door to find the ammo.
Mecha Engineer (Making Real Humanoid Suits)
Advertisement
When your ouside a door, and in the middle of a corridoor.
You fire 2 rays, at 90 degrees left and right.
Those hit the two walls on the corridor.

Now, you shoot out a ray, from the positions of the origional intersection, parellel to the wall.

You then check two collisions:
Between the ray and the wall, and between the ray, and a plane 1 unit closer to you then the wall (and also parelell to the wall).

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement