How do i code for clicking a 3d object?

Blitz3D Forums/Blitz3D Beginners Area/How do i code for clicking a 3d object?

chwaga(Posted 2007) [#1]
i've been looking around and i cant find a code for clicking an object. any help is appreciated :D


Sledge(Posted 2007) [#2]
From the help screen: Samples > Blitz 3D Samples > mak > Pick > pick.bb


chwaga(Posted 2007) [#3]
thanks, i'll try that


chwaga(Posted 2007) [#4]
also, do you know how i could make it, while you're holding the right mouse button down (i know the code for that part), if you move the mouse right, left, up, down, etc., it will pivot the camera inversely?(i know the rotate about a pivot part, i just need help with the moving-the-mouse causing the camera to orbit part)


Stevie G(Posted 2007) [#5]
Something like this should get you started ....

YawRate# = mouseXspeed() * .5
PitchRate# = mouseYspeed() * .5
rotateentity PitchRate, YawRate , 0
movemouse graphicswidth()*.5, graphicsheight()*.5


You may want to store the mouse x,y position before you rotate so that you can re-position the cursor to where it was once you release the mouse button.

Stevie


chwaga(Posted 2007) [#6]
thanks