How to get the shape an fps is aiming to in TGE?
by Galun · in Technical Issues · 06/23/2007 (4:00 pm) · 2 replies
Hi,
I searched the forum for GuiShapeNameHud, GuiCrossHairCtl and lots of other keywords but I could not find anything in this regard.
What I want to achieve is something like in the starter.fps where a health bar is displayed at the crosshair if a shape is in the target. More precisely my game needs to know what you're aiming before you pull the trigger - the display is a nice-to-have, more important is the shape type and name.
I found there are functions to shoot a ray and check for collisions in Torque script but I'm afraid this will be too slow if done permanently and the engine seems to do that anyhow and much better I guess.
I do not need this for a free mouse look mode. The result along the eyevector is enough i.e. the shape that is projected to the screens center.
Thanks in Advance
I searched the forum for GuiShapeNameHud, GuiCrossHairCtl and lots of other keywords but I could not find anything in this regard.
What I want to achieve is something like in the starter.fps where a health bar is displayed at the crosshair if a shape is in the target. More precisely my game needs to know what you're aiming before you pull the trigger - the display is a nice-to-have, more important is the shape type and name.
I found there are functions to shoot a ray and check for collisions in Torque script but I'm afraid this will be too slow if done permanently and the engine seems to do that anyhow and much better I guess.
I do not need this for a free mouse look mode. The result along the eyevector is enough i.e. the shape that is projected to the screens center.
Thanks in Advance
About the author
#2
It's an extremely helpful extension. Many thanks for this link.
06/24/2007 (3:43 am)
Wow, this must have slipped through my forum search.It's an extremely helpful extension. Many thanks for this link.
Torque Owner Dave D