Game Development Community

Twitching Bot Perspective

by Mike Treanor · in Technical Issues · 02/15/2008 (1:47 pm) · 6 replies

Hello,

I posted something about this before in a more convoluted thread that received no replies, so I am trying again, with a more coherent post.

My game involves looking through bot's perspectives, however I am getting some unexplained jerking/twitching. I have a video that demonstrates the problem:
http://www.youtube.com/watch?v=SK3MBvAtzAY

The bot should be moving one small step at a time toward the red torque symbol, however it seems to regularly rotate (yaw) to the right/left a small bit and then correcting itself. Is there some explanation for this? Does anyone have any ideas why this is happening? To achieve the step I am simply calling a setMoveDestination at an intermediate position toward the goal destination (the torque symbol).

Any help would be greatly appreciated.

#1
02/15/2008 (3:04 pm)
Just a note: the twitching happens independent of the think function, so I don't think the problem has to do with anything that I am doing there...

Maybe this has something to do with the observeThroughObject or something?
#2
02/15/2008 (3:13 pm)
Is this with the default player.dts?
#3
02/15/2008 (3:13 pm)
Have you tried using observeThroughObject with a different AI? Like Killer Kork for example, if you get the same effect than it is observeThroughObject. If not, I have no clue.
#4
02/15/2008 (3:45 pm)
@Ramen-sama:
I am not using the default player.dts, but upon your question I tested and the twitch happens when using the default as well. Thanks for the suggestion though.

@Morrock:
Thanks for the suggestion, I 'observeThroughObject'-ed through the kork in starter.fps and there was no twitching... OK, now I am definitely thinking I am causing this somewhere.
#5
02/17/2008 (9:41 am)
I think you should create your own player (NEWplayer class for example) class for AI, now you are using the common player class.
Inherit it by AIplayer class, correct your profiles (using PROFILE_START). Then watch your bot's behavior.
#6
02/26/2008 (3:15 pm)
I figured it out! It had to do with a bug that was solved in this resource: AiPlayer run animation fix (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11218)

Man, I wasn't even close on figuring that one out... thanks for the help for everyone else who tried.