Footprints for custom character not able to get to work?
by Ales Potocnik · in Torque 3D Professional · 12/06/2009 (12:56 pm) · 9 replies
I have a custom character that was given to me by some artist and it works nicely. I have a couple of animations only (not as much as Gideon has), but they work just as expected, only i can not get sequence triggers to work with this character. I even created custom implementation for additional sequence triggers i need for the project and they work like a charm with Gideon (but i can not use that character), but not with my own character (also like the footprints does not work at all). The character is collada mesh with root animation, and additional collada files for each animation sequence. Only nodes i am missing are mount nodes (dont need a weapon) everything else is there. Some special nodes from Gideon skeleton are missing in my character too (but they obviously are not needed for walking around), so i am unsure what is the problem with sequence triggers, which missing "feature" in my character are the problem for this. Thanks for your help.
ales
ales
#2
thanks
12/06/2009 (4:54 pm)
Yes they are, they are created through ShapeEditor. I use 1.1Alpha just to let you know. They are also present in datablock as addTrigger(animName,frame,triggerID) function.thanks
#3
Edit: In the Player::updateActionThread function in player.cpp, on about line 2751, there is a raycast to determine where to put the foot print. If the player model is larger than 2.0 units from origin to feet, then the raycast will not hit anything, and no footprints will be generated. Not sure why this value is hardcoded instead of using the bounding box height though......
12/06/2009 (11:51 pm)
Odd that they are not working then. How tall (in Torque units) is your character model? I seem to remember a problem with footprints if the distance from the model origin to the feet is more than 2.0 Torque units.Edit: In the Player::updateActionThread function in player.cpp, on about line 2751, there is a raycast to determine where to put the foot print. If the player model is larger than 2.0 units from origin to feet, then the raycast will not hit anything, and no footprints will be generated. Not sure why this value is hardcoded instead of using the bounding box height though......
#4
to check if either is triggered?
12/06/2009 (11:55 pm)
BTW - have you tried confirming (using the debugger) that the triggers are not working, and that the problem is not elsewhere? ie. set a breakpoint in Player::updateActionThread under:if (triggeredLeft || triggeredRight)
to check if either is triggered?
#5
It didn't even work with a custom cube mesh (collada from maya (all our models are made with maya 2009)) that just animates its self around the level. I've made it like a player with only root animation and all nodes and joints and it is a player but it just does not trigger anything from sequence triggers.
12/07/2009 (4:13 am)
Well it is not the problem that footprints are not appearing, i don't care much about them, i just used them as an example since they also don't work and they are stock. None of triggers work on my custom models. The player model is about the same size as gideon, a bit different but human as well. I've put Con::printf("some msg"); (to visually debug through console) inside of Player::updateActionThread under all my triggers (Stock 1,2 and custom numbers on) and they don't even get fired. When using any trigger with gideon model it works just like expected. Thanks for your help. It didn't even work with a custom cube mesh (collada from maya (all our models are made with maya 2009)) that just animates its self around the level. I've made it like a player with only root animation and all nodes and joints and it is a player but it just does not trigger anything from sequence triggers.
#6
thanks again
12/07/2009 (4:28 am)
One more thing i even tried just swapping the gideon model with my custom player model from DefaultPlayerData and it does not work as well. I just don't get it how it works with gideon, i gave him all my custom triggers in root sequence and they simply work, but none of my models works, even though they work with everything else i tried so far. The only difference i see is i am using collada mesh and animations from collada files. Oh and some differences are in nodes, my model lacks some, but those are really strangely named so i don't even know where gideon uses them.thanks again
#7
Engine\source\ts\tsShapeOldRead.cpp
I had the same problem a while back, and I think it was Konrad Kiss? who came up with that, worked for me
12/07/2009 (2:20 pm)
try addingif (TSShape::smReadVersion>=22)
{
flags |= MakePath;
}at around line 609, before thes->read(&priority);line in
Engine\source\ts\tsShapeOldRead.cpp
I had the same problem a while back, and I think it was Konrad Kiss? who came up with that, worked for me
#8
@Ales: To fix this problem, set the MakePath flag at the end of TSShape::addTrigger in tsShapeEdit.cpp:
Then delete the cached.dts file and restart the game, all should be working now. This fix will be in the next update of T3D.
12/07/2009 (4:29 pm)
@deepscratch: That may work when loading the cached.dts, but the real problem here is that the MakePath flag is not being set when a trigger is added by the Shape Editor. Thanks for the hint though!@Ales: To fix this problem, set the MakePath flag at the end of TSShape::addTrigger in tsShapeEdit.cpp:
sequences[i].firstTrigger++; } // set MakePath flag so triggers will be animated seq.flags |= TSShape::MakePath; return true; }
Then delete the cached.dts file and restart the game, all should be working now. This fix will be in the next update of T3D.
#9
@Chris: that did the trick, but you might want to investigate further, now the triggers added can not be deleted unless cached.dts is deleted also. Maybe that is the correct way, just wanted to let you know.
thanks agian
12/07/2009 (6:12 pm)
Thank you both for your answers. @Chris: that did the trick, but you might want to investigate further, now the triggers added can not be deleted unless cached.dts is deleted also. Maybe that is the correct way, just wanted to let you know.
thanks agian
Associate Chris Robertson