I am writing a plugin where the player spawns a moving projectile, then a beam is created attached to the the client, and that projectile. The problem is that when the beam is created, it is not visible unless the player is looking away from the projectile / beam end point. The beam is most visible when facing directly away from the projectile, and fades out as I turn towards it. Here is the code where the beam is created
Code:
TE_SetupBeamLaser(iClient, iHook, g_Sprite, 0, 0, 0, 10.0, 0.25, 0.25, 10, 0.0, {255, 255, 255, 255}, 0)
TE_SendToClient(iClient);
iHook is the projectile entity index.
Edit: Upon reversing the order of the entities (setting iHook to the start point and iClient to the end point), the beam becomes visible when looking at the projectile. However, the beam is only visible when the projectile is near the centre of the field of view. I would like to be able to have this beam visible at all times, especially since the projectile will rarely be in the centre of the field of view.