Player/GetViewEntity

From Garry's Mod
Jump to: navigation, search
 Player:GetViewEntity( )

Contents

Description

Returns the entity the player is using to see from (such as the player itself, the camera, or another entity).

Returns

Entity

The entity the player is using to see from

Examples

Example

Will print what entity the first player uses to look through.

print( Entity( 1 ):GetViewEntity() )

Output:

Player [1][ExamplePlayer]
Personal tools
Navigation