crosshairsLaser Attachment (BP_TFA_Attachment_Laser)

Laser attachment actor spawned by the weapon when the socket exists.

Asset path: /Game/InfimaGames/TacticalFPSAnimations/Common/Core/Weapons/BP_TFA_Attachment_Laser

BP_TFA_Attachment_Laser is a cosmetic laser attachment actor spawned by Base Weapon (BP_TFA_BaseWeapon) on BeginPlay when SocketLaserAttachment exists.


Quick Navigation



BeginPlay Setup


On BeginPlay, this actor gets the player character, casts it to BP_TFA_BaseCharacter, copies WeaponConfig from the character, assigns SM_LaserAttachment from WeaponConfig.MeshLaserAttachment, and reads the beam start transform from SM_LaserAttachment.GetSocketTransform(WeaponConfig.SocketLaserStart, RTS_Component).


Tick Behavior


If WeaponConfig is valid, the attachment traces forward 15000 units from SocketLaserStart, scales SM_LaserBeam on the X axis using the hit distance, moves the point light to the impact point, and enables or disables the light depending on whether the trace hits something.

If WeaponConfig is invalid, it runs a DoOnce and disables both the beam and the point light.


Config Fields Used


  • MeshLaserAttachment

  • SocketLaserStart

These values come from Base Config (BP_TFA_BaseConfig).


Notes


Socket placement drives the beam direction, so if the laser looks misaligned, the first thing to tune is the socket on the attachment mesh.

Last updated

Was this helpful?