Entity:TranslatePhysBoneToBone
Description
Returns the boneID of the bone the given PhysObj is attached to.
See Entity:TranslateBoneToPhysBone for reverse function.
Arguments
Returns
Example
Does a trace, gets the physics bone from the trace, converts the physics bone number into the bone number and prints the result
concommand.Add( "boneid", function( ply )
local tr = ply:GetEyeTrace()
local bone = tr.Entity:TranslatePhysBoneToBone( tr.PhysicsBone )
print( bone )
ply:ChatPrint( bone )
end )
Output: The bone number of what the client is looking at