Game Development Community

Mixing 2 Animations with ShapeBaseImageData

by Florian Ross · in Torque Game Engine · 01/27/2006 (4:07 am) · 1 replies

Hi,

I need to set a weapon animation to a specific frame for the weapon while still having my fire animation working. For the actual player body (ShapeBaseData) we could just use setPos. This function isnt supported on ShapeBaseImageData. The only animations i can see are controlled with States. Can i have 2 States running at the same time? Or am i having some fauxpas in my thoughts? Forum Search and TDN didnt really throw up anything that is useful for my case.

Thx alot

Florian

#1
01/27/2006 (4:15 pm)
Fixed it myself.

I was using the function getMountedImage which only returned a ShapeBaseImageData. The function getImageStruct retrieves a MountedImage struct which has a TSShapeInstance among others. This allowed me to use animation threads to controll the animation :)

ShapeBase::MountedImage *weaponImage = getImageStruct(0);
TSShapeInstance *weaponShape = weaponImage->shapeInstance;
weaponShape->setPos( mAnimThread[i], somevalue );