@matesoft you could try and attach the objects with FixObjectToObject( objID, toObjID ) its a bit tricky to use
As the object being fixed uses its current position, rotation, and scale as an offset to the parent.
Quote: "Please notice one thing regarding the example given that the object is not correctly following the mouse when the camera is at a certain position. Am i right?"
The problem is 3d space has 3 vectors a mouse can only have two Vectors x and y in the above example y is replaced with the z axis
but modifying these values
fDiffX# = (GetPointerX() - startx#)/6.0
fDiffY# = (GetPointerY() - starty#)/6.0
in this function should give you a better mouse movement it is dependant on the resolution you have selected aswell
function movecamerawithmouse()
fDiffX# = (GetPointerX() - startx#)/6.0
fDiffY# = (GetPointerY() - starty#)/6.0
newX# = angx# + fDiffY#
if ( newX# > 89 ) then newX# = 89
if ( newX# < -89 ) then newX# = -89
SetCameraRotation( 1, newX#, angy# + fDiffX#, 0 )
SetCameraPosition(1,camerax#,cameray#,cameraz#)
endfunction
fubar