WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-14-2016, 11:18 AM
simrus simrus is offline
Member
 
Join Date: Nov 2016
Posts: 8
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
Reply With Quote
  #2  
Old 11-15-2016, 05:39 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with viztask, callback, and oncollide emmy rando Vizard 4 04-13-2016 06:47 AM
Camera Position And Viztask kovitch Vizard 2 01-11-2011 06:36 AM
viztask waiting vizLearner Vizard 1 11-21-2008 09:08 AM
viztask question asimbh Vizard 1 11-20-2007 09:12 AM
viztask question cade_mccall Vizard 1 04-30-2007 10:25 AM


All times are GMT -7. The time now is 04:24 AM.


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