ModelScene:Project3DPointTo2D

From Warcraft Wiki
Jump to navigation Jump to search

Converts a 3 dimensional point into clip space using the model scene camera properties.

point2DX, point2DY, depth = ModelScene:Project3DPointTo2D(pointX, pointY, pointZ)

Arguments

pointX
number
pointY
number
pointZ
number

Returns

point2DX
number - Screen-space X position as viewed by the model scene camera.
point2DY
number - Screen-space Y position as viewed by the model scene camera.
depth
number - Depth value for the point.

Details

  • This can be used to achieve various effects, from having a frame sit in a specific position on a 3D model that is being rotated/moved, to calculating and drawing 3d quads and triangles using TextureBase:SetVertexOffset(i, x, y)