Thread: [Solved] help with vectors
View Single Post
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 07-14-2018 , 08:40   Re: help with vectors
Reply With Quote #3

PHP Code:
float distance 500.0;
float eyepos[3], eyeangles[3], direction[3], forwards[3], endpoint[3];

GetClientEyePosition(clienteyepos);
GetClientEyeAngles(clienteyeangles);

eyeangles[2] = 0.0;
eyeangles[0] = 0.0//only need this if you don't want to take pitch(x) into account and want a static yaw 500 units away from the player.

GetVectorAngles(eyeanglesdirection);  
GetAngleVectors(directionforwardsNULL_VECTORNULL_VECTOR);  

for(
int i 0;3i++)  
    
endpoint[i] = eyepos[i] + (forwards[i] * distance); 
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline