Gunsight

Blitz3D Forums/Blitz3D Beginners Area/Gunsight

Rook Zimbabwe(Posted 2004) [#1]
I know I probably need a transparent PNG to create the Aim point gunsight thingee... but how to implement it in the code?


electronin(Posted 2004) [#2]
You mean like crosshairs in a FPS?


Warren(Posted 2004) [#3]
Make a texture that has an alpha channel (or a masked color) and draw it in the middle of the screen.


Rook Zimbabwe(Posted 2004) [#4]
Yes, but I want to use that to select things... using pickentity like...


rsbrowndog(Posted 2004) [#5]
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


Warren(Posted 2004) [#6]
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. :)


Rook Zimbabwe(Posted 2004) [#7]
Sorry... You are completely right there!

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

--RZ


electronin(Posted 2004) [#8]
Don't mind EpicBoy, he's always like that :)
Anyways, I use LoadImage and DrawImage for crosshairs mostly.


Rook Zimbabwe(Posted 2004) [#9]
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!!!


WolRon(Posted 2004) [#10]
You have to draw it every frame after RenderWorld.


Rook Zimbabwe(Posted 2004) [#11]
Yep... just like putting text on the screen. I really did know that... really... um... OY!!!

-RZ