Crosshairs dissapearing.
by William M. Johnson · in Torque Game Engine · 06/19/2002 (12:53 pm) · 3 replies
I simply want the crosshairs in the torque demo levels to stay put when I switch to 3rd person mode. I found in game/fps/guicrosshairhud.cc, in the guicrosshairhud's onRender fuction, a section which checks if !conn->isFirstPerson(), and returns from onRender if this checks out:
void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{
// Must have a connection and player control object
GameConnection* conn = GameConnection::getServerConnection();
if (!conn)
return;
ShapeBase* control = conn->getControlObject();
if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson()) /*<<
return;
// Parent render.
Parent::onRender(offset,updateRect);
I simply removed the check for firstperson mode so that the crosshair would still render even in 3rd person mode. The problem is it didn't work, the crosshair still doesn't show. I scanned through the rest of those files, I don't really know what else I missed that could affect this.
Anyone have an idea of what else I need to do?
void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{
// Must have a connection and player control object
GameConnection* conn = GameConnection::getServerConnection();
if (!conn)
return;
ShapeBase* control = conn->getControlObject();
if (!control || !(control->getType() & ObjectMask) || !conn->isFirstPerson()) /*<<
// Parent render.
Parent::onRender(offset,updateRect);
I simply removed the check for firstperson mode so that the crosshair would still render even in 3rd person mode. The problem is it didn't work, the crosshair still doesn't show. I scanned through the rest of those files, I don't really know what else I missed that could affect this.
Anyone have an idea of what else I need to do?
About the author
Torque Owner Badguy
are you sure it rebuilt?
cause it works fine for me.