A_GeigerCounterTool is an Actor Blueprint designed to simulate a Geiger counter tool within Unreal Engine. It visually and audibly represents the intensity of radioactivity detected by an associated radioactivity component. The Blueprint updates an indicator needle rotation and audio parameter in real-time based on the current radiation levels, providing immersive feedback to the player.
Variable Name | Type | Purpose |
---|---|---|
OwnerRadComp | Object Reference | Holds a reference to the radioactivity component associated with the owning actor. Used to retrieve radiation intensity data. |
MinRadVal | Float | Stores the minimum radiation value detected or expected from the radioactivity component. Used for scaling the indicator. |
MaxRadVal | Float | Stores the maximum radiation value detected or expected from the radioactivity component. Used for scaling the indicator. |
CurrentIndicatorRot | Float | Tracks the current rotation angle of the Geiger counter's indicator needle. This value is interpolated smoothly to update the needle's rotation. |
Component Name | Type | Description |
---|---|---|
GeigerCounter_Indicator | StaticMeshComponent | The visual needle or indicator mesh that rotates to show radiation intensity. |
Audio | AudioComponent | Audio source component used to play and modulate Geiger counter clicking sounds based on radiation intensity. |
Tool | StaticMeshComponent | The static mesh representing the Geiger counter tool itself. |
InitializeGeigerCounter
to set up references and enable ticking.Get Component by Class
.OwnerRadComp
.OwnerRadComp
.MinRadVal
and MaxRadVal
to map the radiation intensity to a normalized range suitable for UI and audio feedback."RadIntensity"
with the mapped radiation value to modulate sound intensity or frequency.CurrentIndicatorRot
value towards the target rotation based on the radiation intensity.GeigerCounter_Indicator
component's relative rotation, rotating the needle to visually represent radiation intensity.