Game Development Community

Crosshair disappearing

by Michael Cozzolino · in Torque Game Engine Advanced · 11/06/2006 (11:46 am) · 2 replies

IIRC this problem also happened in TGE. Maybe this is supposed to be like this. We are using the Turret resource and when mounting we mount the player but set the control object to the turret. Once this happens all is well except the crosshair is gone. What is strange to me is the playgui still has it set to visible and enabled but its not there despite that.

Here is the before

img504.imageshack.us/img504/7471/base00000005jb6.th.png

Here is the after

img505.imageshack.us/img505/6675/base00000006yr0.th.png

About the author

Indie Developer in the Albany NY area. iOS, PC, Mac OSX development. http://itunes.apple.com/us/artist/michael-cozzolino/id367780489


#1
11/06/2006 (2:21 pm)
This is intended behavior :p

You need to open game/fps/guiCrosshairHud.cpp and modify

static const U32 ObjectMask = PlayerObjectType | VehicleObjectType;

and add the TurretObjectType to that, and it should take care of it. There is a check for First person/Third person, but not sure if that will be valid in this case, if so, it can be forced to come back properly within the turret code..
#2
11/06/2006 (2:27 pm)
Thanks byte. I figured since it is a client camera that it would automagically set the crosshair. Then again I guess I should have figured it doesn't because the same happens when you alt-c.