LocalToWorld

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

Contents

Description

Translates the specified position and angle from the specified local coordinate system into worldspace coordinates.

If you're working with an entity's local vectors, use Entity:LocalToWorld and/or Entity:LocalToWorldAngles instead.

See also: WorldToLocal, the reverse of this function.

Arguments

Vector localPos

The position vector in the source coordinate system, that should be translated to world coordinates

Arguments

Angle localAng

The angle in the source coordinate system, that should be converted to a world angle. If you don't need to convert an angle, you can supply an arbitrary valid angle (e.g. Angle()).

Arguments

Vector originPos

The origin point of the source coordinate system, in world coordinates

Arguments

Angle originAngle

The angles of the source coordinate system, as a world angle

Returns

Vector

The world position of the supplied local position.

Returns

Angle

The world angles of the supplied local angle.
Personal tools
Navigation