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

Trace Ray Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shadowdragon
Senior Member
Join Date: Dec 2012
Old 01-20-2015 , 00:29   Trace Ray Help
Reply With Quote #1

Hey all im trying to spawn some props and it works ok but not how i would like it to work, ATM if you spawn a prop well looking at the ground it spawns correctly but if you look at another prop it spawns half way inside that prop and if you spawn a prop under another prop the possition does not change and it just spawns the prop allthe way inside the existing prop this is my trace ray setup.

I am also fairly new to this so examples would be amazing!

PHP Code:
stock GetCollisionPoint(clientFloat:pos[3])
{
    new 
Float:vAngles[3], Float:vOrigin[3], Float:AnglesVec[3], Float:EndPoint[3];
    
    new 
Float:Distance 600.0;
    
    
GetClientEyeAngles(client,vAngles);
    
GetClientEyePosition(client,vOrigin);
    
GetAngleVectors(vAnglesAnglesVecNULL_VECTORNULL_VECTOR);
    
    
EndPoint[0] = vOrigin[0] + (AnglesVec[0]*Distance);
    
EndPoint[1] = vOrigin[1] + (AnglesVec[1]*Distance);
    
EndPoint[2] = vOrigin[2] + (AnglesVec[2]*Distance);
    
    new 
Handle:trace TR_TraceRayFilterEx(vOriginEndPointMASK_SHOTRayType_EndPointTraceEntityFilterPlayerclient);
    
    if(
TR_DidHit(trace))
    {
        
TR_GetEndPosition(postrace);
        return;
    }
    
    
CloseHandle(trace);

Please any help would be great!
__________________
Sorry for my poor English!
________________________________
I can do CSS/CSGO plugin request for little money!

Last edited by shadowdragon; 01-20-2015 at 00:31.
shadowdragon is offline
shadowdragon
Senior Member
Join Date: Dec 2012
Old 01-20-2015 , 16:00   Re: Trace Ray Help
Reply With Quote #2

Please anyone i really need help with this :\
__________________
Sorry for my poor English!
________________________________
I can do CSS/CSGO plugin request for little money!
shadowdragon is offline
ItsFatso
New Member
Join Date: Jan 2015
Old 01-20-2015 , 18:39   Re: Trace Ray Help
Reply With Quote #3

bump
ItsFatso 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:13.


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