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

intersection EngFunc_TraceLine


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anderpp
Junior Member
Join Date: Feb 2018
Old 08-17-2018 , 10:39   intersection EngFunc_TraceLine
Reply With Quote #1

Hi guys

I'm trying to get the point of contact between the two beams, but I could not succeed. I used some plugins, beam_entity and beams.inc, the idea is to create an entity beam that could touch another beam.

Can anyone give a suggestion?
I've attached a snapshot to get an idea.
Thank you!
Attached Images
File Type: jpg de_dust20000.jpg (52.0 KB, 82 views)
anderpp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-17-2018 , 10:46   Re: intersection EngFunc_TraceLine
Reply With Quote #2

Simple math check if the two vectors cross each other.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
anderpp
Junior Member
Join Date: Feb 2018
Old 08-17-2018 , 11:55   Re: intersection EngFunc_TraceLine
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Simple math check if the two vectors cross each other.
you can give me a simple example?

Here's a simple example of what I've tried:

PHP Code:
public hookthink(param[])
{
    new 
id param[0]
    new 
HookEnt param[1]
    
    static 
Float:fOrigin1[3], Float:fOrigin2[3]
    
    
pev(idpev_originfOrigin1)
    
pev(HookEntpev_originfOrigin2)
    
    new 
tr
    engfunc
(EngFunc_TraceLinefOrigin1fOrigin2DONT_IGNORE_MONSTERSidtr)
    
    static 
Float:fFraction
    get_tr2
(trTR_flFractionfFraction)
    
    if (
fFraction != 1.0)
            
client_print(idprint_chat"right! have intersection")

In the example mentioned above, I can only get with solid entities. I cited this example to understand what I want to do.

Again, Thanks!
anderpp is offline
Reply



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 05:41.


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