Posted: 2nd Sep 2003 18:50
Here is the 23423424. 3D mouse cursor code. (DBP/DBC)
Try it!
Posted: 3rd Sep 2003 8:04
Shame about the errors, but once I changed the if (osy0 then ... to if osy=0 then ... and removed the endif's it worked fine, a bit shakey though
Posted: 4th Sep 2003 0:10
It's here again.
If you find a bug in it, that was made by the forum.

(Sorry for my bad English)
Posted: 4th Sep 2003 0:18
The bug is in the FORUM!

+ Code Snippet
backdrop on : autocam off : sync on : hide mouse

make matrix 1,2000,2000,10,10
position camera 0,1000,1000
point camera 1000,0,1000
make object cube 1,50
make object cube 2,200
position object 1,100,0,1000
position object 2,100,10,800
hide object 2

do
if leftkey()=1 then yrotate camera wrapvalue(camera angle y()-3)
if rightkey()=1 then yrotate camera wrapvalue(camera angle y()+3)

if upkey()=1 then zrotate camera wrapvalue(camera angle z()-3)
if downkey()=1 then zrotate camera wrapvalue(camera angle z()+3)

yrotate object 1,wrapvalue(camera angle y()-90)
yrotate object 2,wrapvalue(camera angle y()-90)

sync
osx=object screen x(1)
if (osx<mousex())
	ktx=mousex()-osx
	move object 1,-10
	mozg=mozg+1
	osx=object screen x(1)
	ktx2=mousex()-osx
	if ktx-ktx2<>0 then hossz=int(ktx2/(ktx-ktx2))*10 else hossz=1
	if (ktx-ktx2)>ktx2 then hossz=1
	move object 1,0-hossz
	endif
osx=object screen x(1)
if (osx>mousex())
	ktx=osx-mousex()
	move object 1,10
	mozg=mozg+1
	osx=object screen x(1)
	ktx2=osx-mousex()
	if ktx-ktx2<>0 then hossz=int(ktx2/(ktx-ktx2))*10 else hossz=1
	move object 1,hossz
	endif

yrotate object 1,wrapvalue(camera angle y())
yrotate object 2,wrapvalue(camera angle y())

osy=object screen y(1)
if (osy<mousey())
	kty=mousey()-osy
	move object 1,-10
	mozg=mozg+1
	osy=object screen y(1)
	kty2=mousey()-osy
	if kty-kty2<>0 then hossz=int(kty2/(kty-kty2))*10 else hossz=1
	if (kty-kty2)>kty2 then hossz=1
	move object 1,0-hossz
	endif
osy=object screen y(1)
if (osy>mousey())
	kty=osy-mousey()
	move object 1,10
	mozg=mozg+1
	osy=object screen y(1)
	kty2=osy-mousey()
	if kty-kty2<>0 then hossz=int(kty2/(kty-kty2))*10 else hossz=1
	move object 1,hossz
	endif
if osy=mousey()
	position object 2,object position x(1),object position y(1),object position z(1)
	endif
loop
Posted: 19th Sep 2003 2:25
nice bit of coding there just what i was looking for