Vector Helper

Hello,

I look for an addon like gmod 10 : vector helper, but I can’t found it to fix it since garrysmod.org is down.
If anyone know an other tool like it, that will be cool :slight_smile:

( Vector Helper : get the vector position of what we point compared to an entity | A STool/SENT designed to assist in the creation of FindInSphere and FindInBox. )

To grab the point you’re looking at in relation to an entity use:


local _p = LocalPlayer( );
local _tr = _p:GetEyeTrace( );
local _ent = _tr.Entity;
local _hitpos = _tr.HitPos;
local _localpos = nil;

if ( IsValid( _ent ) ) then
	_localpos = _ent:WorldToLocal( _hitpos );
end

To use the local position to convert to a world position use: _ent:LocalToWorld( _localpos );