#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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. |
|
|
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 |