Garry's Mod Wiki

Entity:TranslatePhysBoneToBone

Description

Returns the boneID of the bone the given PhysObj is attached to.

See Entity:TranslateBoneToPhysBone for reverse function.

Arguments

1 number physNum
The PhysObj number on the entity

Returns

1 number
The boneID of the bone the PhysObj is attached to.

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

Page Links


Special Pages


Wikis

?

Render Time: 45ms

DB GetPage 3
Generate Html 15
SaveChanges 12
Render Body 0
Render Sidebar 12