![]() |
velocity conversion
I am moving an object using the vizact.move command which takes
meters/sec as an argument for speed. How would I convert the meters/sec velocity to a screenpixels/sec velocity? |
If the object is added to the screen (viz.ORTHO), then the units will already by in pixels/sec. If the object is added to the world (viz.WORLD), then it gets more complicated. Is your object part of the screen or world?
|
The object is in the world. I know it's more complicated - that's
why I know you have the answer. |
I'm assuming that the viewpoint is fixed while the object is moving? Otherwise it will be REALLY complicated ;)
|
Yes, the viewpoint is stationary.
|
Here is a script that creates an action that is similar to vizact.goto() except the speed is in pixels/sec. Run the script and press space bar to run the action.
Code:
import viz |
We are all humbled by your brilliance (I mean it!)
|
All times are GMT -7. The time now is 03:07 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC