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 / Making object follow mouse cursor

Author
Message
AureyH
14
Years of Service
User Offline
Joined: 25th Oct 2010
Location:
Posted: 26th Oct 2010 05:17
Hi,

I'm trying to get an object to follor the mouse cursor on the screen and have been looking around the forums for some help. I've come across one that people seem to be using but I can't seem to make head or tail of it. Could someone shed some light on or elaborate it.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Oct 2010 17:22
pick object() gets the object under the mouse

get pick vector x(), y() and (z) give you the 3D coordinates of the object under the mouse relative to the camera and then add the camera position to the coordinates to get its actual position in the 3D World.

AureyH
14
Years of Service
User Offline
Joined: 25th Oct 2010
Location:
Posted: 27th Oct 2010 03:20
What it obj.ground referring to in this instance? Also object.current.

Bear with me because I'm seriously new to this.. Haha
AureyH
14
Years of Service
User Offline
Joined: 25th Oct 2010
Location:
Posted: 27th Oct 2010 03:47
Ah nevermind, I got it to work. Thanks for your help.

Login to post a reply

Server time is: 2024-11-24 09:39:33
Your offset time is: 2024-11-24 09:39:33