#1
|
|||
|
|||
Create image directly in front of head
I'd like to create a vision-occluding polygon that hangs directly in front of the virtual user's head. I need to be able to manipulate the position of this polygon, so that it covers different parts of the view depending on where I move it. By default, it will cover exactly half of the view.
I've managed to generate a polygon that is head-attached, but it seems to hang directly through the centre of the "eyes", such that the player can see through the plane. In other words, the plane does not occlude the view, but can be seen if you look around. How can I code this plane to sit slightly further forwards, so that it obscures the view of the world? Here's what I'm using at the moment ('scotoma.png' is simply a 128x128 coloured square): Code:
scotoma = viz.addTexture('scotoma.png') quad = viz.addTexQuad(parent=viz.HEAD, texture=scotoma,size=50) Code:
quad.setPosition(quad.getPosition() + [0, 10, 0]) Any ideas? It's important that the polygon is head-relative, as I need to shift it around a little bit from time to time. Any help would be greatly appreciated. |
#2
|
|||
|
|||
Quote:
Code:
quad = viz.addTexQuad(parent=viz.HEAD, size=1) quad.color(1,0,0) quad.setPosition([0,0,10]) |
#3
|
|||
|
|||
Many thanks - works perfectly
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
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 |