Game Development Community

ACK and T3D, AIPlayer is gliding

by Joshua Leeming · in Torque 3D Professional · 05/08/2011 (4:30 am) · 9 replies

I've posted this issue over on the brokeassgames.com site: link for those who have signed up.

However, in case anyone in the community has encountered this, I'm going to post here as well.

To see the issue for yourselves, you will need MACK or FACK for T3D...once installed create a new project, launch the world editor and then type the command:

new AIPlayer(FACK) { datablock = "DefaultFemalePlayerData"; position = LocalClientConnection.camera.getPosition(); };

Move away from where the AIPlayer spawned and type the command:

FACK.setMoveDestination(LocalClientConnection.camera.getTransform());

There's a couple of posts that seem related to this issue: here and more specifically here, however I get varied results implementing/reverting the changes mentioned in these threads - all of which have not been successful.

EDITED: to look more like english

#1
05/08/2011 (4:40 am)
If I add this bit of code to the end of pickActionAnimation()

GameConnection* conn = GameConnection::getConnectionToServer();
if(conn && conn->isAIControlled())
Con::printf("josh debug: %d %d", this->getId(), action);

I don't seen any output in the console...it would explain why the AIPlayer is gliding if I'm looking at the right thing.

Could somebody please please please lemme know if I'm not debugging this correctly...


my next step is to now find out why pickActionAnimation is not being called.
#2
05/08/2011 (7:10 am)
Did you try this flow with the stock SDK 'Gideon' player object turned into a AI object, or is this issue only appearing when using the ACK product?

I don't think this is 'ACK Package specific'....as there are a few Threads at this site[and you linked them], describing this issue. This is a AIPlayer object issue, as the 'Player' object does not have the gliding issues....or does it?

IE, it's not the Advanced Character Kits causing this[as far as we've been able to determine]....it's the engine under the beta3 codeBase.

I would inquire in those Threads about any solutions they suggest.
#3
05/08/2011 (2:47 pm)
Hi Rex, thanks for getting back...I think this issue is ACK specific. I re-installed 1.1b3 this morning, new full project etc...

new AIPlayer(gid) { datablock = "DefaultPlayerData"; position = LocalClientConnection.camera.getPosition(); };

and

gid.setMoveDestination(LocalClientConnection.camera.getTransform());

Gideon ran over to me as expected.


Quote:Yes,currently this fixes the script setactionthread calls,but breaks the c++ ones for the Ais. I found this today.
A simple solution is to revert the changes and define your script animations to be after NumTableActionAnims in your TSShapeConstructor.
The c++ called sequences should be before NumTableActionAnims.

I'm going to try and implement Ivan's suggestion (from here and see where that gets me.

Cheers

J

EDIT: fixed url
#4
05/10/2011 (12:39 pm)
I've posted some information over at our home site here.
#5
05/31/2011 (6:39 pm)
Was there any progress here Rex?
I've popped over to the BAG site and not seen any updates either.
Experiencing the issue with MACK and NPCs myself.
#6
06/01/2011 (4:37 am)
I fixed the problem a few months ago with a quick rework of pickActionAnimation().

I start with the null animation.
Then I check for very small (or zero) velocity - in this case 'root' is picked.
Then I handle the rest ones.

No floating players (and AIs) so far.
#7
06/01/2011 (7:52 am)
i thought that the T3D version of this was supposed to be out in a few weeks according to this old post

http://www.garagegames.com/community/blogs/view/20957
#8
06/01/2011 (11:11 am)
I've added this to the known issue list we have going on the BAG forums. We'll look at Ivan's fix. Thanks.

@Ivan
Did this work fine with the 8-way-named animations from the ACKT3D build, or did you revert back, rename any?

Jondo
#9
06/01/2011 (1:18 pm)
@Jondo

No,I use my own animation list that has nothing to do with the stock list.But I assumed to isolate the problem - I actually had floating players almost every time.If you follow the advice I gave to Netwyrm and the corrections to pickActionAnimation()..I think your problem should be solved.
One of the problems (the floating AIs) was the contact timer.Checking for control solved the problem.But I think the correct way to pick AI animations is velocity.Zero velocity means 'root'. Positive velocity means 'run' .. etc..