Game Development Community

Resource Questions

by Gary "ChunkyKs" Briggs · in Torque Game Engine · 02/09/2005 (2:59 pm) · 1 replies

I'm currently looking at the turret resource, and have a question or two.

I'm trying to implement something similar, by adding bits to Player.

In turret, some of the code looks like this:
shapeResource = ResourceManager->load(shapeName,false);
turretNode = shapeResource->findNode("codeTurret");
mShapeInstance->setNodeAnimationState(getDataBlock()->turretNode,
   TSShapeInstance::MaskNodeHandsOff);

I want my code to look something like:
shapeResource = {insert code here};
handlNode = shapeResource->findNode("Bip01 L Hand");
mShapeInstance->setNodeAnimationState(handlNode,
   TSShapeInstance::MaskNodeHandsOff);

Two questions:
1) I'm trying to add this to Player [as opposed to PlayerData, or anything else]. Is this right? All I'm doing is some client-side animation of individual bones
2) Is this the right way to do it? Is there an easier shapeResource = ThisPlayersShapeResource; ? Should I be doing this in PlayerData instead? [even though it's purely some client-side voodoo]
3) If there's not, what goes in the {insert code here} bit above?
4) What other incrediby stupid things am I missing?

Thank-you very much,
Gary (-;

#1
02/10/2005 (3:24 am)
The part is going to look something like hShape or mShapeInstance... You're looking for a TSShapeInstance pointer in the player instance.

1. Yeah, seems about right.
2. Yes. Seems abouts right.
3. See above.
4. Doing OK, I think.