#1
|
|||
|
|||
Track Eye Gaze with Lines
I am trying to add lines (aka: "rays", whatever you want to call them) to indicate where an avatar is looking. So ideally the line originates at the avatar's head and extends out according to their gaze. This is what I'm using to create the lines:
Code:
[ x, y, z ] = avatar.getpos() y = 1.4 viz.startlayer( viz.LINES ) viz.linewidth( 1 ) gazeOrigin = viz.vertex( x, y, z ) gazeEnd = viz.vertex( x, y, z + 5 ) gaze = viz.endlayer() gaze.color( viz.BLUE ) gaze.alpha( 0.3 ) |
#2
|
|||
|
|||
Hi,
Just change the position of the second vertex: Code:
gaze.vertex(1,x,y,z) Code:
gaze.dynamic() |
|
|