Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / moving a 3d object with mouse problem please help.

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 2nd Dec 2005 10:47
using dbpro.

In my program i would like to be able to move an object an place it in somthing using the mouse however i am having trouble getting it to stay on the mouse.
here is an exaple of what i have but it is not working properly.

i am not very good at math. i have dride dividing the distance. and th object will succesfully move at the same speed as the mouse but only after the mousemove reaches a certain high number

A child's dream never dies.
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 2nd Dec 2005 20:37 Edited at: 3rd Dec 2005 14:18
Won't make much of a change, but take out the minus underlined below

position object 1,object position x(1)+mousemovex(),object position y(1)+-mousemovey(),0

mousemove I believe returns the number of pixels the mouse has moved in the relavent direction. Whereas position object uses 3D units of measurement (not pixels). You could try hiding the cursor while moving your object (your user probably won't care as now the object is effectively their cursor).

Your code for dividing the distance I'm not sure of, may help if you show that little section of your code... Otherwise for now I would say try hiding the cursor while moving the object.

...maybe one day I'll finish a project
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 3rd Dec 2005 01:01
yes i had the same idea and it is completely feasable however
i was more so interessted in the how to idea. I like to know how stuff works especially when i run into a problem. but i will go ahead and use the object as the cursor.


thank you for your time and input.

A child's dream never dies.

Login to post a reply

Server time is: 2024-09-24 09:25:27
Your offset time is: 2024-09-24 09:25:27