Game Development Community

Full DTS model/animation swap

by Andy Schatz · in Torque Game Engine · 05/09/2005 (9:12 pm) · 4 replies

I'm trying to create birds that swap to a different model when they fly as opposed to when they are perched. My modeler created two models, two rigs, two sets of animations. I'd like to swap the visible model while retaining the same data object.

I know there is stuff LIKE this for damaging objects, but I think it might just be done with texture swapping, which is not good enough for my purposes. Can anyone point me in the direction of a thread, resource, or file that could help me swap this bird?

#1
05/10/2005 (12:42 pm)
You just need to create 2 datablocks and swap them, there is no way to swap a shapefile any other way.
#2
05/10/2005 (12:54 pm)
You might try using the snazzy new google search to find some resources on this... ;)

Really the best thing would be to keep it all in one DTS. Maybe you could just have both models in the same DTS, and show/hide the appropriate one? :)

Failing that, you could use C++ to switch between two TSShapeInstance's. Ought to be a not too scary change.

Or you can try changing the object's datablocks on the fly, which may or may not work fully/quickly.
#3
05/10/2005 (2:30 pm)
I Used a fair bit of dataBlock swapping for a Tribes2 mod to good effect.The main downside is that it will lack any transition, the bird would be flying then *blink* it's perched, otherwise the swap has always been instantanious when I have observed it.
#4
05/10/2005 (3:09 pm)
@Ben - I ended up swapping ShapeInstances. I had already tried that but I had done it incorrectly, so I had given up. When I went back I cleaned up the code and it worked fine. Thanks for the advice!