Raised This Month: $12 Target: $400
 3% 

Temp Ent beams attached to client are invisible


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HymnsForDisco
Junior Member
Join Date: Dec 2015
Old 12-18-2017 , 17:48   Temp Ent beams attached to client are invisible
Reply With Quote #1

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.

Last edited by HymnsForDisco; 12-18-2017 at 17:54.
HymnsForDisco is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-18-2017 , 20:44   Re: Temp Ent beams attached to client are invisible
Reply With Quote #2

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
__________________
8guawong is offline
HymnsForDisco
Junior Member
Join Date: Dec 2015
Old 12-24-2017 , 03:55   Re: Temp Ent beams attached to client are invisible
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
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.
HymnsForDisco is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-24-2017 , 04:30   Re: Temp Ent beams attached to client are invisible
Reply With Quote #4

OK maybe if you can post a video so we can better visualize the problem
__________________
8guawong is offline
tonline_kms65
Member
Join Date: Aug 2016
Location: Ru. Komsomol-on-Amur
Old 12-18-2018 , 05:03   Re: Temp Ent beams attached to client are invisible
Reply With Quote #5

Quote:
Originally Posted by 8guawong View Post
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
tonline_kms65 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:42.


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