🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Bot visibility radius?

Started by
13 comments, last by d000hg 20 years, 10 months ago
What exactly is this new feature? I presume just a very limited way of telling if there is something (very) nearby but not in your FOV, is this correct? If so can it see every obstacle type wall/grenade/enemy/tree etc or just certain ones?
Advertisement
Yes, a way of telling if something is nearby, but not in your FOV. It can see grenades, trees, and rocks, but it cannot see walls and the enemy.

Admin for GameDev.net.

Dah, can''t see walls... that''s the major part people are getting stuck on .
quote: Original post by Ready4Dis
Dah, can''t see walls... that''s the major part people are getting stuck on .


That''s what the new 90 degree FOV for walls is for.


Admin for GameDev.net.

Yeah, mine doesn''t rely much on that though, kinda wrote it without knowing that was going to be implemented . Oh well, still isn''t working perfectly, so maybe the new info can help a bit .
so walls can be seen 90 deg from bots face, and everything else is 80 deg, do i understand this correctly?
quote: Original post by Anonymous Poster
so walls can be seen 90 deg from bots face, and everything else is 80 deg, do i understand this correctly?


Yes.. walls are seen within a 90 degree FOV, and all other objects are seen within an 80 degree FOV. I believe it''s in the readme or changes.txt.

Admin for GameDev.net.

3 questions:
1)Does this visibility radius notify us of objects always when they''re far enough away we can avoid them. Otherwise if it had a 20unit range and our speed was 25 we could hit something before being warned. Just a minor point to make make building easier with less error detection required.
2)Any chance it can give true readings of direction. I see you want to make it less accurate but can you either give us true direction or just a less accurate reading like to the nearest 30 degrees so we know which way to turn?
3)The 80 & 90 degree FOV - this means we can see +/- 40 or 45 degrees respectively from the direction we''re facing, right? So you can _just_ see two walls at once if you point directly at the corner? Didn''t you suggest a 180 degree FOV for walls previously, I''d prefer that personally.
Is the direction of object in the map calculated from the objects center?

Like, when I''m checking the bots direction to an object, is that angle the angle to the object center point, or some other point?
Also, it is my understanding that the direction parameter of the GetObjectsInSight should return a -40 - 40 degree range, I am frequently getting a reading of 180 for some reason.

int numObjects = g_pCore->GetNumObjectsInSight();
for(int i = 0; i < numObjects; i++)
g_pCore->GetObjectsInSight(i, objectList.type, objectList.direction, objectList.distance, objectList.objDirection);<br> <br>then<br><br>sprintf(msg, "Object: %s Distance: %.1f Direction: %.1f \n", <br> GetObjectString(objectList[closestIndex].type),<br> objectList[closestIndex].distance,<br> objectList[closestIndex].direction);<br><br>and I frequently get 180 for the direction. That doesnt look like the intended output judging by the readme. </i>

This topic is closed to new replies.

Advertisement