WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-10-2014, 01:09 PM
Erikvdb Erikvdb is offline
Member
 
Join Date: May 2013
Posts: 63
Quote:
Originally Posted by Notch View Post
I've tried using the following to manipulate the position of the polygon:

Code:
quad.setPosition(quad.getPosition() + [0, 10, 0])
In python, [x,y,z] + [a,b,c] actually gives you [x,y,z,a,b,c], so no wonder that doesn't work. The solution is actually much simpler. Since the quad is parented to the head, setPosition defaults to relative translation. In other words, you can simply say:
Code:
quad = viz.addTexQuad(parent=viz.HEAD, size=1)
quad.color(1,0,0)
quad.setPosition([0,0,10])
This places a red quad of 1x1 meter 10 meters in front of your view. Change size and position (and color/texture) as you see fit.
Reply With Quote
 


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
Eye position relative to center of head? performlabrit Vizard 1 01-07-2014 08:30 AM
360 panorama image cube using as darts target and record the xy coordinates mshukun Vizard 2 03-14-2013 06:17 AM
Custom head with 3dmenow or facegen & peoplemaker Frank Verberne Vizard 4 01-17-2013 12:46 PM
Problems with imported Facegen head Don Vizard 1 11-04-2011 01:27 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM


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


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