ai walking backwards wtf?
by deepscratch · in Torque 3D Professional · 09/27/2009 (1:07 pm) · 21 replies
hi all,
I implemented the flexable A* resource, no problems at all,
but,
I'm having an issue with the ai player, he always seems to face only one direction when moving about,
when he starts to perform a function, he doesnt turn, he constantly faces in the direction he was facing when the command began.
so he doesnt turn to face a forward direction when moving.
any ideas??
thanks.
Steve, you implemented that resource no?
help??
I implemented the flexable A* resource, no problems at all,
but,
I'm having an issue with the ai player, he always seems to face only one direction when moving about,
when he starts to perform a function, he doesnt turn, he constantly faces in the direction he was facing when the command began.
so he doesnt turn to face a forward direction when moving.
any ideas??
thanks.
Steve, you implemented that resource no?
help??
About the author
email me at medan121@gmail.com
Recent Threads
#3
Personally I've not set up any pathfinding in T3D yet, still working on making something for them to run around first.
The previous one I got working in TGE/A was Gabriel Notman's, which I thought was what you were using.
Maybe Harry Potter -- I mean, Bryce could wizard something up from his can of Mountain Dew. ;D
EDIT: Doesn't that just use setmovedestination() to get the AI going? Which should force the AI to point towards it's goal. Memory a little hazy...
Double Edit: You do have AIPlayer::AimAt function in AIPlayer.cs?
Triple Edit: I don't see anything particularly special in my old pathfinding scripts, but I do %this.clearaim(); if the AI gets/loses a target. Apart from that it's all handled with setmovedestination(); --- and after a quick, none Astar test with fairly regular AI, that causes the AI to face the way it's running.
09/27/2009 (6:59 pm)
Check that the AI does setAimObject(); when it gets a new destination - or at least clears it's previous setAimObject ... unless it's moving and shooting of course.Quote:Which one's that?
flexable A* resource
Personally I've not set up any pathfinding in T3D yet, still working on making something for them to run around first.
The previous one I got working in TGE/A was Gabriel Notman's, which I thought was what you were using.
Maybe Harry Potter -- I mean, Bryce could wizard something up from his can of Mountain Dew. ;D
EDIT: Doesn't that just use setmovedestination() to get the AI going? Which should force the AI to point towards it's goal. Memory a little hazy...
Double Edit: You do have AIPlayer::AimAt function in AIPlayer.cs?
Triple Edit: I don't see anything particularly special in my old pathfinding scripts, but I do %this.clearaim(); if the AI gets/loses a target. Apart from that it's all handled with setmovedestination(); --- and after a quick, none Astar test with fairly regular AI, that causes the AI to face the way it's running.
#4
Do you by any chance mean this resource: Flexible A* Pathfinding System?
09/27/2009 (7:27 pm)
Kind of OT, but in my experiments with AI in Torque3d the old Gideon model would only crawl when I used him -- but the new model works just fine, never did figure out why,. And let me tell you, that sure was disturbing to see him come crawling at you at full speed.... or was it more disturbing to then shoot him ;DDo you by any chance mean this resource: Flexible A* Pathfinding System?
#5
I think Deepscratch is also using custom models.
Crawling Gideon ... now that sounds scary.
09/27/2009 (7:37 pm)
Ah, I see which Pathfinding now. Hadn't looked at that thread in aeons, didn't know Deep was using it.I think Deepscratch is also using custom models.
Crawling Gideon ... now that sounds scary.
#6
yeah, the Flexible A* Pathfinding System.
ha, I thought I was the only one with the crawling issue!! my bots do that too! had to remove the crawl and crouch animation files to stop them, still dont know why they do it.
yeah, I'm using custom models, but they are set up correctly.
I'm not calling the pathing functions from script, and I dont have script funtions for them, I'm calling straight from console. would this be a cause?
09/28/2009 (12:17 am)
thanks for the responses guys,yeah, the Flexible A* Pathfinding System.
ha, I thought I was the only one with the crawling issue!! my bots do that too! had to remove the crawl and crouch animation files to stop them, still dont know why they do it.
yeah, I'm using custom models, but they are set up correctly.
I'm not calling the pathing functions from script, and I dont have script funtions for them, I'm calling straight from console. would this be a cause?
#7
its a problem with my scripts,
I'll have to change my %obj.setAimLocation settings with an "if" for when they are pathing.
09/28/2009 (7:16 am)
ok,its a problem with my scripts,
I'll have to change my %obj.setAimLocation settings with an "if" for when they are pathing.
#8
I thought I was the only one who had the crawling AI problem. Couldn't delete the animations to the old Gideon since they were contained in the model... I probably never would have thought that... But he's definitely standing up and running now, so whenever that next release comes out how about giving your guy another try and see if it's 'fixed' for him too.
09/28/2009 (10:45 am)
So you were able to solve the walking backwards problem? Sounds like it anyway. I thought I was the only one who had the crawling AI problem. Couldn't delete the animations to the old Gideon since they were contained in the model... I probably never would have thought that... But he's definitely standing up and running now, so whenever that next release comes out how about giving your guy another try and see if it's 'fixed' for him too.
#9
09/28/2009 (11:04 am)
yeah, no problem Michael.
#10
Flexible A* Pathfinding System in T3D, or has used it in tgea, please could you share a script file showing the useage of the functions from script?
I cant wrap my head around the "how to", and the resource has no scripted examples.
it all works fine from typing in console, but thats really not an option for a game.
thanks ever so much.
09/28/2009 (5:10 pm)
if any one is using the Flexible A* Pathfinding System in T3D, or has used it in tgea, please could you share a script file showing the useage of the functions from script?
I cant wrap my head around the "how to", and the resource has no scripted examples.
it all works fine from typing in console, but thats really not an option for a game.
thanks ever so much.
#11
09/29/2009 (5:21 pm)
lol at the crawling gideon.. I'd like to see that.
#13
10/02/2009 (1:16 pm)
Hmm... curiouser and curiouser. I never did figure out the crawling issue myself, as it only happened (to me) with the one model. I still haven't had a chance to compare the two Gideons to see what changed... but don't give up I'm sure we'll figure something out.
#14
10/02/2009 (1:33 pm)
what is funny though, is when you shoot this crawling idiot, he jumps up to die.
#15
Also, did anyone make choosing stances part of the AI's routine? Thus telling it what the default should be, and when it should change stance.
10/02/2009 (1:46 pm)
Is the crawl code still setup in Player.cpp?Also, did anyone make choosing stances part of the AI's routine? Thus telling it what the default should be, and when it should change stance.
Quote:All adds to the melodrama
when you shoot this crawling idiot, he jumps up to die.
#16
Yeah, the crawl/prone code is still in there. The new Gideon only has a crouch animation though, and truthfully the prone stance has the potential to cause more problems than it's worth.
But you do raise a very good point about default stances and all that.
10/02/2009 (2:49 pm)
@Steve:Yeah, the crawl/prone code is still in there. The new Gideon only has a crouch animation though, and truthfully the prone stance has the potential to cause more problems than it's worth.
But you do raise a very good point about default stances and all that.
#17
This does bring up one question - does the player/AI model's bounding box change orientation or size with the stances? Cos then they'd never bother to get back up again because the bounds-top would be the same as their eyenode height(ish) when crouched.
10/02/2009 (4:59 pm)
I've planning (once I get a vaguely completed level sorted out) on using an AI system, where the AI gets a list of allowed stances derived from the nearest pathfinding node (or node they are moving towards as a goal), and then choose which stance best suits their situation. eg: if they want to shoot an enemy, and can see them from their eyenode and bounds-centre but not bound-base, then they'd go crouch to make themselves a smaller target than standing but not prone because their LOS would be blocked.This does bring up one question - does the player/AI model's bounding box change orientation or size with the stances? Cos then they'd never bother to get back up again because the bounds-top would be the same as their eyenode height(ish) when crouched.
#18
I'm pretty sure that it doesn't account for orientation of the player though. From what I remember when shooting the crawling Gideon, shooting him in the "back" resulted in a headshot -- the top XX% of the box -- but then I was shooting him with a RocketLauncher :D
I will be further testing this phenomenon over the weekend. It just blows my mind that it works with the new model and setup but is still giving deepscratch problems :(
10/02/2009 (5:18 pm)
Quote:does the player/AI model's bounding box change orientation or size with the stances?In theory it does. There is some code in there that resizes the bounding box based on stance and settings that can be passed through the datablocks for both crouch and prone (swimming too) -- how well it works I'm not all that sure of nor can I say if it works for the AI or not...
I'm pretty sure that it doesn't account for orientation of the player though. From what I remember when shooting the crawling Gideon, shooting him in the "back" resulted in a headshot -- the top XX% of the box -- but then I was shooting him with a RocketLauncher :D
I will be further testing this phenomenon over the weekend. It just blows my mind that it works with the new model and setup but is still giving deepscratch problems :(
#19
Yeah, I can see how a 10m explosion from the body might also damage the head ... 8D
10/02/2009 (5:29 pm)
Quote:
shooting him in the "back" resulted in a headshot -- the top XX% of the box -- but then I was shooting him with a RocketLauncher :D
Yeah, I can see how a 10m explosion from the body might also damage the head ... 8D
#20
relevant??
10/02/2009 (5:54 pm)
remember, I'm using a version 22 model character, which is an old shape,relevant??
Torque Owner deepscratch
DeepScratchStudios
it seems, when he moves to a new position, he always faces his spawn point, his original position, not the next node, no matter what.
send him to as many points as you want, using any of the A* functions, he always faces his original spawning point.