Hello Again,
After having tried the values in the above post, I wound up with the expected result. The object was shifting slightly but would still return to the same initial position (0,0,0) when I would let go of the mouse. So I changed the code to the following:
Function MouseControls()
Set Cursor 0,100
MousePosX = Mousex()
MousePosY = Mousey()
Print "Mouse Position X: ",MousePosX," Mouse Position Y: ",MousePosY
If MouseClick() = 0 Then Pickmode = 0
If Mouseclick() = 1
If Pick object(MousePosX,MousePosY,5,5) > 0
If Pickmode = 0
d# = Get Pick Distance()
x# = Get Pick Vector X()
y# = Get Pick Vector Y()
z# = Get Pick Vector Z()
Print "Object position is: x ",x#," y ",y#," z ",z#
Inc Pickmode,1
EndIf
Endif
If Pickmode = 1
x2# = Get Pick Vector X() + x#/10
y2# = Get Pick Vector Y() + y#/10
z2# = Get Pick Vector Z() + z#/10
Pick screen MousePosX,MousePosY,d#
dx# = x# - x2#
dy# = y# - y2#
dz# = z# - z2#
print dx#," ",dy#," ",dz#
Endif
Position Object 5,-dx#,-dy#,-dz#
EndIf
newobjx# = Object Position X(5) - dx#
newobjy# = Object Position Y(5) - dy#
newobjz# = Object Position z(5) - dz#
Position Object 5,newobjx#,newobjy#,newobjz#
print x#," ",y#," ",z#
print "CLICK AND HOLD OBJECT TO DRAG"
ENDFUNCTION
Now the object moves more acceptably, however it tends to return to 0,0,0 when I let go of the mouse button then reclick the object again. In the last few lines of code I'm trying to "reset" the objects position to a new value so it doesn't keep going to 0,0,0. Not successful yet. Please post any solutions you may have. Thank You.