AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Temp Ent beams attached to client are invisible (https://forums.alliedmods.net/showthread.php?t=303721)

HymnsForDisco 12-18-2017 17:48

Temp Ent beams attached to client are invisible
 
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.

8guawong 12-18-2017 20:44

Re: Temp Ent beams attached to client are invisible
 
This is normal I think imagine looking at a straight line from the end you'll basically see a point
You could probably play around with the width end width etc

HymnsForDisco 12-24-2017 03:55

Re: Temp Ent beams attached to client are invisible
 
Quote:

Originally Posted by 8guawong (Post 2566955)
This is normal I think imagine looking at a straight line from the end you'll basically see a point
You could probably play around with the width end width etc

I understand what you're saying but that is not what's happening. The laser itself doesnt come from the camera origin, but actually a little bit in front of it. The beam is perfectly visible if I face away from the end point. It doesn't become invisible because of the angle you are viewing it from, the material literally fades out the closer your view angle gets to the end point.

8guawong 12-24-2017 04:30

Re: Temp Ent beams attached to client are invisible
 
OK maybe if you can post a video so we can better visualize the problem

tonline_kms65 12-18-2018 05:03

Re: Temp Ent beams attached to client are invisible
 
Quote:

Originally Posted by 8guawong (Post 2567900)
OK maybe if you can post a video so we can better visualize the problem

I have the same problem. The beam is visible only at a certain angle.

VIDEO:
https://youtu.be/xovt-WjVOAQ


All times are GMT -4. The time now is 07:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.