Game Development Community

Enemy health bars on cars

by Lee Latham · in Torque Game Engine · 12/27/2007 (9:10 pm) · 0 replies

When I've got my crosshairs on an enemy player, or an AIFlyingVehicle (from the air combat starter kit), I see a health bar showing their current health. But for some reason, it doesn't show when a player is in a regular vehicle.

I've been chasing around the crosshair and playgui gui code to no avail. I just don't get it. Any idea what might be (not) happening?

I did noticed that in guiCrossHairHud.cc that it seems to be casting a ray, and if it hits an object it queries a pointer (I think) to get the health level. Could it not returning a value for some reason?