WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Viztask overview? (https://forum.worldviz.com/showthread.php?t=5892)

simrus 11-14-2016 11:18 AM

Viztask overview?
 
I'm coming to Vizard from having previously written all my own code in Opengl in C with for loops and things, and its proving a bit of a culture shock....

I want to do something that should be very simple but I'm struggling. I want to make the movement of an object(/s) in the scene contingent of the movement of the viewpoint. To give an example, imagine an object that copies the movement of the viewpoint (i.e. the viewer). So previously what I'd do is calculate the movement of the viewpoint (current_position-old_position) and then apply the same movement vector to the object. I'd maybe add a bit of noise or a temporal delay (so I'd need to buffer movements in an array) so it doesn't follow perfectly.

I think I need to use viztask for this purpose but I can't work out how to use it. The documentation seems to jump from simple tutorials/demos that use canned actions to in-depth info that goes over my head. Is there any further documentation that gives me an overview of how viztask works and the ideas behind it?

simon

Jeff 11-15-2016 05:39 PM

One option might be to set the object's reference frame so transformations are relative to the view.

Use the vizact.onupdate command to register a function that gets called every frame. In that function you could get the view position and based on that set a new position for the object.


All times are GMT -7. The time now is 12:52 PM.

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