WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-03-2009, 12:30 PM
yak yak is offline
Member
 
Join Date: May 2009
Posts: 22
linking

Code:
import viz
import viztask
viz.go()




def DrawLineTask():
	
	while True:
		
		#Wait for left mouse butten to be pressed
		yield viztask.waitMouseDown(viz.MOUSEBUTTON_LEFT)
		
		#Get mouse position
		pos = viz.mouse.getPosition()
		
		#Create line
		viz.startlayer(viz.POINTS)
		viz.vertexcolor(viz.RED)
		viz.alpha(3)
		
	
		viz.vertex(pos[0],pos[1],0)
		viz.vertex(pos[0],pos[1],0)
		viz.ABS_PARENT
		point = viz.endlayer(parent=viz.SCREEN)
		#Create link between mouse position and vertex
		VertexLink = viz.link(viz.Mouse,point.Vertex(1))
		
		#Wait for mouse button to be released
		yield viztask.waitMouseUp(viz.MOUSEBUTTON_LEFT)
		
		#Destroy link
		VertexLink.remove()
		
viztask.schedule( DrawLineTask() )
this code is for drawing points on a 3d model, mainly the male avatar. what I am stuck with is trying to link it to the male while he is animated so after i draw on him it is linked to him even after another action in demonstrated such as walking or picking something up.
Reply With Quote
 

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
sensor linking question smith11235 Vizard 6 05-31-2011 04:58 PM
linking view to avatar 5ky1ine Vizard 7 04-21-2009 11:03 AM
Linking problems with Live Character Frank Verberne Vizard 5 06-04-2008 11:42 AM
Body linking nige777 Vizard 3 03-06-2008 02:17 PM
Linking avatar 'bones' to a position tracker. zachhendershot Vizard 3 11-19-2003 09:26 PM


All times are GMT -7. The time now is 05:28 AM.


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