Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Combining 2D and 3D

Author
Message
PirateJohn
14
Years of Service
User Offline
Joined: 4th Aug 2011
Location: California
Posted: 5th Aug 2011 07:23
I tried searching for this topic but I couldn't find anything on it. If there's already a thread, then a link would be great.

Anyway, I seem to be having trouble combining 3D graphics with 2D commands. For example, if I try to write text to the screen when I have a 3D environment in front of me, I can't see the text that I have written. Similarly, I'm trying to draw 2D shapes on the screen and they don't show up.

Specifically, what I'm working on is a target shooting simulator. In the distance, you see the target rings and use the joystick to aim the rifle. When you press the trigger, I want to draw an image on the side of the screen that shows where your shot ended up, as well as display your score.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Aug 2011 10:14 Edited at: 5th Aug 2011 10:15


Hmm, works for me... The text is visible over the cube

Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 5th Aug 2011 11:24
try using the
draw to camera
command.

it will send all 2d printing to the camera.
you will also need to print the text every loop or it will disappear when the program syncs.

unless your using sprites, which seem to hang around until you delete them

kezzla

Sometimes I like to use words out of contents
PirateJohn
14
Years of Service
User Offline
Joined: 4th Aug 2011
Location: California
Posted: 7th Aug 2011 11:03
Ohhhh, thanks, that must have been the problem. I don't think I was drawing the text every loop. I'll be sure to try that.

Login to post a reply

Server time is: 2026-07-10 15:31:05
Your offset time is: 2026-07-10 15:31:05