WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-07-2008, 07:51 AM
Karla Karla is offline
Member
 
Join Date: May 2007
Posts: 12
Example request for vizact.boneSpinTo()

I noticed that for the Q1 2008 Release of Vizard, vizact.boneSpinTo() is listed as an addition.

vizact.boneSpinTo() action for animating avatar bones

I am running vizard_3.00.2701. I cannot find any additional information about vizact.boneSpinTo() in the Help Documentation.

Can someone please post an example of how to use vizact.boneSpinTo() without including the sample script as posted above? For now I'm using the sample script but more condensed code would be preferable.

Thanks!

~Karla
Reply With Quote
  #2  
Old 05-07-2008, 09:40 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Here is a short sample:
Code:
lookLeft = vizact.boneSpinTo('Bip01 Head',mode=viz.AVATAR_LOCAL,euler=(-90,0,0),speed=90)

avatar.runAction(lookLeft)
And here is the documentation for the command:
Code:
<vizact>.boneSpinTo(	    
    bone	    
    mode = viz.ABS_PARENT	    
    quat = None	    # Keyword argument
    euler = None	    # Keyword argument
    axisAngle = None	    # Keyword argument
    speed = None	    # Keyword argument
    time = None	    # Keyword argument
)

 

bone
An Avatar bone object or the name of a bone.

mode = viz.ABS_PARENT
The transformation mode to apply the rotations with

quat = None
The quaternion rotation to spin to

euler = None
The euler rotation to spin to

axisAngle = None
The Axis-Angle rotation to spin to

speed = None
The speed to spin at in degrees/sec

time = None
The amount of time to spin for
Reply With Quote
  #3  
Old 05-07-2008, 03:07 PM
Karla Karla is offline
Member
 
Join Date: May 2007
Posts: 12
Thank you!

I was working in a long file, which made troubleshooting more difficult than necessary. I made the following concise example and got it to work. With a more positive resolve, I was able to find my mistakes in the longer file. It's all working now.

Thanks,
Karla

Code:
#******************************************************************************************
#******************************************************************************************
#Trying to use boneSpinTo with avatar in Art Gallery
#Created: May 6th, 2008
#******************************************************************************************
#******************************************************************************************

import viz
import viztask 	#For wait time

viz.go()

viz.MainView.setPosition(0,1.72,7.5)
viz.MainView.setEuler(183,0,0)

#Add an avatar
male = viz.add('male.cfg'); male.translate(0.25,0,5.5); male.rotate(0,1,0,-3); male.state(1)				#Start in neutral state animation
face1 = male.face('biohead_talk.vzf')	#add a face to the avatar

#speed settings for boneSpinTo()
headSpeed = 100
	
def SpinHeadLeft():
	yield viztask.waitTime(2)		#Wait 2 seconds
	lookleft = vizact.boneSpinTo('skel_Head',mode=viz.AVATAR_LOCAL,euler=(-90,0,0),speed=headSpeed)
	male.runAction(lookleft)

viztask.schedule( SpinHeadLeft() )

#***********************************************************
#Adding a world
#***********************************************************
room = viz.add('gallery.ive') # Load
room.scale(1,1,1)  # scale actual
room.translate(0,0,0) ## position in the world
Reply With Quote
Reply

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
cal3d exporter issue reiverlass Vizard 4 07-18-2007 12:08 PM
importing avatars with cal3d marcoleon Vizard 15 04-28-2006 04:48 PM
importing cal3d in 3ds? shai Vizard 1 11-01-2004 10:19 AM
Using Cal3d Avatars zachhendershot Vizard 4 01-27-2004 10:26 AM
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 06:35 AM.


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