PDA

View Full Version : Get a user's current position from an object?


cgibb
06-02-2009, 09:30 PM
Hello,

I'm attempting to have a user click on a certain model, but in order to activate, the user must be a certain distance from the object. I've found documentation on vizmat.Distance, but how can I get the user's current position?

Thanks in advance!

Jeff
06-03-2009, 11:45 AM
You can get the user's position by getting the viewpoint position.
pos = viz.MainView.getPosition()

cgibb
06-03-2009, 05:47 PM
That worked great. Thanks!