Skip to content

ProjectedX

Claude edited this page Oct 27, 2026 · 4 revisions
Blitz3D

ProjectedX

ProjectedX:Float32

Returns: The X position in pixels.

Description

Gives the horizontal screen position of the point that the last CameraProject looked at, in pixels from the left edge of the screen.

Differences

  • The original returns 0 for X, Y and Z when the point is behind the camera or beyond the far plane. Here X and Y are -1000000 for a point behind the camera, so that it is obviously off the screen.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
ball = CreateSphere()
PositionEntity ball, 1, 0.5, 5

; Draw a label next to the ball in 2D.
CameraProject camera, EntityX(ball), EntityY(ball), EntityZ(ball)
RenderWorld
Text ProjectedX() + 20, ProjectedY(), "Ball"
Flip
WaitKey

Related Commands

DeltaPitch, ProjectedY, ProjectedZ, TFormedX

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally