2d to 3d, placing text above model, mousecursor

Blitz3D Forums/Blitz3D Programming/2d to 3d, placing text above model, mousecursor

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You shouldn't use the Text command in a 3D game at all, except for debugging purposes.

For your first question, I suggest that you use a quad mesh or a sprite above the head entity (make it a child of the head). Then just texture it with a masked texture (flag 4) with the text you want on a black background.

Second question is a bit more tricky. I suggest you have an invisible "picking" quad which is parented to the camera. It should be at, say, (0, 0, 200) and facing towards the camera. It should be scaled to fill the whole screen. Use HideEntity to make it invisible. Set its pickmode to polygon.

Now each loop to position your mouse, first ShowEntity the picking quad. Now do a CameraPick() at the mouse co-ordinates. Use PickedX#(), PickedY#(), PickedZ#() to position your mouse quad/sprite and point it towards the camera. Then HideEntity the picking quad again.