Game Development Community

Displaying Mounted Object Names

by JPaxson · in Torque Game Engine · 07/12/2006 (3:14 pm) · 0 replies

I am trying to display the names of all objects mounted to my player object via guiShapeNameHud. Basically I want to have a label for the helmet, gun, backpack, cantine, as well as the players name.
I added the following underneath the drawName of the original render, trying to get the number of mounted objects, and a reference to each based on index. But nothing draws.

U32 mountedOjects = shape->getMountedObjectCount();
			
for(int i=0; i<mountedOjects; i++)
{
                ShapeBase * currentShape = shape->getMountedObject(i);
	drawName(Point2I((S32)projPnt.x, (S32)projPnt.y),currentShape->getShapeName(),opacity);
				
}

Am I missing something, or has anyone else done this sort of thing and can maybe give me a shove in the right direction? Thanks in advance for any help.