Clientside Prop Touched

Hi everyone,
I have made a clientside prop_physics with thanks to the people in this thread.
However, I would like to know how I can add touch detection to it? This is completely clientside so I can’t have any serverside hooks/functions.

Is it possible?

And using distances as detection system will look bad?

Good point, but how can I get whether a player ‘touched’ it inside the corners of the prop?

You can use ents.FindInBox()
But, you won’t be able to rotate that box created

You could probably use OBBMins and OBBMaxs

Try http://wiki.garrysmod.com/page/Entity/AddCallback

I tried this myself, doesnt seem to work with internal entities in my usage.

[lua]

function ENT:IsPointInside( pt )
local lPos = self:WorldToLocal( pt )
local cPos = self:OBBMins()
for _, k in ipairs(Card) do
if cPos[k] > lPos[k] then return false end
end
cPos = self:OBBMaxs()
for _, k in ipairs(Card) do
if cPos[k] < lPos[k] then return false end
end
return true
end
[/lua]

[lua]

if e:IsPointInside( ply:GetPos() + Vector(0, 0, 32) ) then

[/lua]

That’s the point of the function, add callbacks for C entities because you can’t add them otherwise.

Weird, didnt work when I tried to add a Use function to a ragdoll.
Or even a think callback.

It only allows 3 specific callbacks ( Open the page I posted, it lists all 3 ), not every hook ever.