Gunsight

Blitz3D Forums/Blitz3D Beginners Area/Gunsight

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.

I know I probably need a transparent PNG to create the Aim point gunsight thingee... but how to implement it in the code?

You mean like crosshairs in a FPS?

Make a texture that has an alpha channel (or a masked color) and draw it in the middle of the screen.

Yes, but I want to use that to select things... using pickentity like...

Use CameraPick with the screen x,y co-ordinates of your crosshairs.

CameraPick ( camera,viewport_x#,viewport_y# )

Parameters:

camera - camera handle 
viewport_x# - 2D viewport coordinate 
viewport_z# - 2D viewport coordinate

More info here:

http://www.blitzbasic.co.nz/b3ddocs/command.php?name=CameraPick&ref=3d_a-z

Cheers,

Ryan

Yes, but I want to use that to select things... using pickentity like...

That's the kind of valuable information that would have been more at home in your initial post.

Just FYI. :)

Sorry... You are completely right there!

Its not that i can't think... its simply that I forget HOW sometimes!!!

--RZ

Don't mind EpicBoy, he's always like that :)
Anyways, I use LoadImage and DrawImage for crosshairs mostly.

I can't seem to get it to stick in the center of the screen I mean it flashes on once at the beginning but then goes bye bye!!!

You have to draw it every frame after RenderWorld.

Yep... just like putting text on the screen. I really did know that... really... um... OY!!!

-RZ