Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CameraTransformWorldToPanel(IPanel, Vector3, Camera)

Transforms a world absolute position to its equivalent local coordinate on given panel, using provided camera for internal WorldToScreen transformation.
Read time 1 minuteLast updated 12 days ago

Definition

public static Vector2 CameraTransformWorldToPanel(IPanel panel, Vector3 worldPosition, Camera camera)

Parameters

panel

The local coordinates reference panel.

worldPosition

The world position to transform.

camera

The Camera used for internal WorldToScreen transformation.

Returns

Type

Description

Vector2A position in panel coordinates that corresponds to the provided world position.