Bout to shoot myself

Blitz3D Forums/Blitz3D Programming/Bout to shoot myself

Chroma(Posted 2006) [#1]
Not sure why....but....I'm drawing 2d lines in 3d...and when I turn the camera all the lines pop up to the left hand corner of the screen. Like a big spider web.


Danny(Posted 2006) [#2]
STEP OFF THE LEDGE NOW! ;)

If your coordinates are way off-screen, blitz resets them to 0,0. A line from 100,100 to -240, 4096 would do that for example. So always check that: IF X >= 0 and X <= graphicsWidth() AND Y >= 0 and Y <= graphicsheight() THEN draw your line... Check both start & end points of course.

You're trying to label an entity on screen, turning the camera would push the entity offscreen and create 2d coordinates of some massive number or 'Nan' (not a number).
Think what the 2d coordinates would be relative to the camera of an object BEHIND IT! :)))

Danny