Ai doesn't see player when in air or above them? How to fix?
by Alaric Karczag · in Game Mechanics Kit · 03/10/2010 (8:31 pm) · 15 replies
In the test gmk level if you have jets to fly or the player jumps on top of the room to the left of the big garage door he ai will close the distance but will not shoot. Any thime the player is above the ai they stop shooting. How can I make them always fire at the target player. I am using a fresh compile of gmk in1.8.2 and the spaceman player model.
Where are the limits for the ai vision?
Does do they see up/down?
Where to look at the code to fix this.
Thanks again all!
Where are the limits for the ai vision?
Does do they see up/down?
Where to look at the code to fix this.
Thanks again all!
#2
Try to tweak following params in your bot datablock.
attackFov = 45;
attackDist = 60;
Try to set attackFov to 60 or 70.
03/18/2010 (9:24 am)
Maybe AI doesn't see you because you out of fov? Try to tweak following params in your bot datablock.
attackFov = 45;
attackDist = 60;
Try to set attackFov to 60 or 70.
#3
so im guessing that its something to do with my compile.
I did notice that the demo is 1.8.1, and the code im using is 1.8.2
is there anything that may have changed between 1.8.1 and 1.8.2 that makes the AI FOV fail when the player is above or flying?
can anyone else who has a fresh compile of 1.8.2 and GMK confirm?
i'm thinking its my building and i'm going to try again.
for someone else to check: compile just 1.8.2 and GMK.
with the jetpack character right-click to fly/hover over to the "office" to the left of the main door (that ai come out of)
and fly on top of it.
does the AI shoot at you?
03/19/2010 (12:15 am)
i re-downloaded the demo level you have, and the AI works correctly, as expected, there.so im guessing that its something to do with my compile.
I did notice that the demo is 1.8.1, and the code im using is 1.8.2
is there anything that may have changed between 1.8.1 and 1.8.2 that makes the AI FOV fail when the player is above or flying?
can anyone else who has a fresh compile of 1.8.2 and GMK confirm?
i'm thinking its my building and i'm going to try again.
for someone else to check: compile just 1.8.2 and GMK.
with the jetpack character right-click to fly/hover over to the "office" to the left of the main door (that ai come out of)
and fly on top of it.
does the AI shoot at you?
#4
04/02/2010 (6:56 am)
Three's only minor difference between GMK for TGEA 1.8.1 and TGEA 1.8.2 versions. So I don't think this is the case.
#5
followed install instructions line by line.
compiled.
the mygame.exe i compiled plays, physics working, switches, softbodies,
BUT
background sound is not playing, And the AI still don't see me when I Jet above their eyeline height.
note:
using the GMK.exe that was unzipped with the other files makes the background music play properly, looks like all works
EXCEPT
jetting above eyeline height the AI stops shooting. they still close the distance towards me, and then start moving side to side "dodging".
but they stop shooting.
only time they shoot when i jet above eyeline height is in the demo.
PLease look into this, what can i send you to look at to see if it was something I did wrong?
04/13/2010 (6:41 am)
i just did a fresh install New 1.8.2 and redownloaded New 1.2.8followed install instructions line by line.
compiled.
the mygame.exe i compiled plays, physics working, switches, softbodies,
BUT
background sound is not playing, And the AI still don't see me when I Jet above their eyeline height.
note:
using the GMK.exe that was unzipped with the other files makes the background music play properly, looks like all works
EXCEPT
jetting above eyeline height the AI stops shooting. they still close the distance towards me, and then start moving side to side "dodging".
but they stop shooting.
only time they shoot when i jet above eyeline height is in the demo.
PLease look into this, what can i send you to look at to see if it was something I did wrong?
#6
the demo orkbot is:
chaseFarDist = 20;
chaseCloseDist = 14;
attackFov = 45;
attackDist = 4;
and works great...wtf?
those same stats in my compile = they never shoot.
so i started testing the FoV stat:
never = they never shoot at me EVER.
ground = they shoot at me on the ground but not above eye level
FoV deg: result: (attackDist = 60 always)
45; ground
50= never
55= ground
60= never
65=ground
70=never
75=ground
80=never
85=ground
90=never
100=never
105=ground
110=ground
120= med safty zone over bots
130=shoot except small safty area right over him
135=always except almost above him small safe zone
140=shoots except almost above him med safe zone
180=always
then i tried:
attackFov = 45;
attackDist = 180;
and they shoot at me except when almost directly over them...
the results are just too odd, but consistant not to think its a bug somewhere.
Also this is i hit "recompile" like it said in the docs, but for most of this i used Your GMK.exe as it had sound and myGame.exe did not have sound, but results work the same reguardless which one i used.
this is beyond my abilities.
can I get a compiled version already integrated properly?
TGEA 1.8.2 and GMK 1.2.8 working and compiled properly?
anyone else had trouble with LOS?
I plan on having the AI on patrol and attack only if the player gets in the AI FoV, so getting these issues with the FoV resolved is important.
Thanks again for any insight.
04/13/2010 (8:15 am)
i just dont get itthe demo orkbot is:
chaseFarDist = 20;
chaseCloseDist = 14;
attackFov = 45;
attackDist = 4;
and works great...wtf?
those same stats in my compile = they never shoot.
so i started testing the FoV stat:
never = they never shoot at me EVER.
ground = they shoot at me on the ground but not above eye level
FoV deg: result: (attackDist = 60 always)
45; ground
50= never
55= ground
60= never
65=ground
70=never
75=ground
80=never
85=ground
90=never
100=never
105=ground
110=ground
120= med safty zone over bots
130=shoot except small safty area right over him
135=always except almost above him small safe zone
140=shoots except almost above him med safe zone
180=always
then i tried:
attackFov = 45;
attackDist = 180;
and they shoot at me except when almost directly over them...
the results are just too odd, but consistant not to think its a bug somewhere.
Also this is i hit "recompile" like it said in the docs, but for most of this i used Your GMK.exe as it had sound and myGame.exe did not have sound, but results work the same reguardless which one i used.
this is beyond my abilities.
can I get a compiled version already integrated properly?
TGEA 1.8.2 and GMK 1.2.8 working and compiled properly?
anyone else had trouble with LOS?
I plan on having the AI on patrol and attack only if the player gets in the AI FoV, so getting these issues with the FoV resolved is important.
Thanks again for any insight.
#7
getting same error as post 6
I think FoV or something is broken.
04/14/2010 (7:46 am)
tried a new 1.8.2, just copied the files over from GMK and turned on Bullet physics as in step 7.getting same error as post 6
I think FoV or something is broken.
#8
I will do tests and let you know.
Hopefully, I will to do it tomorrow.
04/14/2010 (7:48 am)
Alaric, thanks for the info about FOV.I will do tests and let you know.
Hopefully, I will to do it tomorrow.
#9
I got no errors in compile, same FoV issue but no sound.
Your gmk.exe file size is 5664 kb
my compile is only 5138kb.
That's on a full build.
I have a programmer helping me so I'm not compleatly clueless ;)
04/14/2010 (10:15 pm)
Also. The only way sound plays in the orks demo level is if I use the gmk.exe that came in the zip. I got no errors in compile, same FoV issue but no sound.
Your gmk.exe file size is 5664 kb
my compile is only 5138kb.
That's on a full build.
I have a programmer helping me so I'm not compleatly clueless ;)
#10
I've recheck FOV
And yes it seems like bug. I need to fix it.
Orcs never shoot with the FOV of 50 and it's pretty odd to me while the code for calculating FOV is very simple and can be found in AIBot::updateEnemy() aiBot.cpp.
As for the sound I don't know what is the source of a problem. GMK doesn't make any changes to sound system it only adds SOundPlayer object. Try to get the latest DirectX SDK, but it still very strange to me.
04/16/2010 (10:25 am)
@AlaricI've recheck FOV
And yes it seems like bug. I need to fix it.
Orcs never shoot with the FOV of 50 and it's pretty odd to me while the code for calculating FOV is very simple and can be found in AIBot::updateEnemy() aiBot.cpp.
As for the sound I don't know what is the source of a problem. GMK doesn't make any changes to sound system it only adds SOundPlayer object. Try to get the latest DirectX SDK, but it still very strange to me.
#11
oh well...
I am waiting for the TGEA release of GuideBot, hopefully the AI code there will over-ride what's in GMK and I'll be using it for the game.
don't know how differnt GMK vs GB is, but if the GB core is based off GMK I did want you to know about the bug.
if GB is totally seperate, and it over-rides the GMK AI code, I'll just use GB instead of GMK.
04/22/2010 (4:39 pm)
I've tried recompiling it a few times.oh well...
I am waiting for the TGEA release of GuideBot, hopefully the AI code there will over-ride what's in GMK and I'll be using it for the game.
don't know how differnt GMK vs GB is, but if the GB core is based off GMK I did want you to know about the bug.
if GB is totally seperate, and it over-rides the GMK AI code, I'll just use GB instead of GMK.
#13
We're in progress.
Port of Guide Bot for TGEA, updated version of GMK and GuideBot's pathfinder are all due to come within few weeks.
Unfortunately, GMK and GuideBot are not our only projects so we are late on the schedule.
Currently we spent a lot of time on Guide Bot Topology - our innovation pathfinder (it will be available for both GMK and Guide Bot) but naturally it left a little time for new releases with bugfixes. But we haven't abandon any of our plans and proceed as fast as we can.
05/10/2010 (3:48 am)
Sorry, AlaricWe're in progress.
Port of Guide Bot for TGEA, updated version of GMK and GuideBot's pathfinder are all due to come within few weeks.
Unfortunately, GMK and GuideBot are not our only projects so we are late on the schedule.
Currently we spent a lot of time on Guide Bot Topology - our innovation pathfinder (it will be available for both GMK and Guide Bot) but naturally it left a little time for new releases with bugfixes. But we haven't abandon any of our plans and proceed as fast as we can.
#14
That was a silly mistake :(
In Gmk 1.2.9 that is due to be released I fixed this.
aiBot.cpp, ln 418 should be as in follows.
It was
09/03/2010 (4:06 pm)
Currently I'm porting GMK to T3D beta and checked FOV bug.That was a silly mistake :(
In Gmk 1.2.9 that is due to be released I fixed this.
aiBot.cpp, ln 418 should be as in follows.
ConsoleMethod( AIBot, attackParams, void, 4, 4, "()")
{
return object->attackParams(dAtof(argv[2]), dAtof(argv[3]));
}It was
return object->attackParams(dAtof(argv[3]), dAtof(argv[4]));
Torque 3D Owner Alaric Karczag
the bots shoot at me when flying?!?!
gonna have to try and recompile mine again.
hoping its not a 1.8.1 vs 1.8.2 issue.