WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Get a user's current position from an object? (https://forum.worldviz.com/showthread.php?t=2068)

cgibb 06-02-2009 09:30 PM

Get a user's current position from an object?
 
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.
Code:

pos = viz.MainView.getPosition()

cgibb 06-03-2009 05:47 PM

That worked great. Thanks!


All times are GMT -7. The time now is 09:27 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC