WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-29-2006, 12:14 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Still need help

I posted this last week and still have not received a response. Please help. I have to get this done sometime this week and I would appreciate the help. If it would help, I can include the code for the entire program.

Thank you
Reply With Quote
  #2  
Old 08-29-2006, 03:40 PM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
At a quick glance the code looks sound. Can you send as concise a copy as possbile of the simulation that replicates this problem to support@worldviz.com and maybe we can find out what's wrong?
Reply With Quote
  #3  
Old 09-01-2006, 02:44 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Just a guess: Somewhere along the line you are using the same global varable to hold the link/gun/avatar/whatever object. So when you setting up the avatars you are overwriting references to the link/whatever objects you need. Keep these things assoated with the avatars you create.

Code:
#Setting up avatar
avatar1.currentWeapon = avatar1.getChild("hand").add( 'gun.wrl')
.
.
.
#Swap in new weapon
tempWeapon = avatar1.currentWeapon
avatar1.currentWeapon = sidelinedWeapon
sidelinedWeapon = tempWeapon 

avatar1.currentWeapon.parent( avatar1.getChild("hand") )
avatar1.currentWeapon.visible( viz.ON )

sidelinedWeapon.visible( viz.OFF )
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #4  
Old 09-05-2006, 12:15 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
That sounds like that might work, however, I'm having a hard time finding the child object for hand and neck. I know you can't just put hand and neck, but I'm not sure where to find what the actual name of the child objects are. The avatar file is above the 1.0MB limit, therefore I cannot attach it as a reference. I did try to right-click on the the avatar in the resources window, but no properties came up.

Last edited by betancourtb82; 09-05-2006 at 12:51 PM.
Reply With Quote
  #5  
Old 09-05-2006, 12:59 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
There should be a plus icon next to the avatar in the resources window. Expand that to show bones icon which then has a list of avatar bones
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #6  
Old 09-05-2006, 01:04 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
I did that. For this avatar, the hand is named skel_HandRF (for right hand finger). I used the following code. I received the following errors:
** ERROR: Could not find child with name 'skel_HandRF'
** ERROR: Could not find child with name 'skel_HandRF'
** ERROR: Could not find child with name 'skel_Neck'


Code:
for x in range(0,3):
 if x == 0:
  male = viz.add(people[2])
  male.scale(.11,.11,.11)
#  GetWeapon(male,0)
  male.currentWeapon = male.getchild('skel_HandRF').add("M16M203.WRL")
  male.tag = 0
  male.threatening = TRUE
  male.appearance = 0
  male.facepic = 0 
 elif x == 1:
  male = viz.add(people[1])
  male.scale(.11,.11,.11)
  male.currentWeapon = male.getchild('skel_HandRF').add("C:\Program Files\Vizard25\resources/phone.3ds")
#  GetWeapon(male,1)
  male.tag = 1
  male.threatening = FALSE
  male.appearance = 0
  male.facepic = 0
 elif x ==2:
  male = viz.add(people[0])
  male.scale(.11,.11,.11)
  male.visible(0,'gz_mave_headwht.cmf')
  male.face(faces[0])
#  GetWeapon(male,2)
  male.currentWeapon = male.getchild('skel_Neck').add("camera.WRL")
  male.tag = 2
  male.threatening = FALSE
  male.appearance = 0
  male.facepic = 0
 male.translate(3*x,-10,10)
 male.rotate(180)
 #Add the avatar to the waiting and lemming list
 waitlist.append(male)
 characters.append(male)

Last edited by betancourtb82; 09-05-2006 at 01:11 PM.
Reply With Quote
  #7  
Old 09-05-2006, 04:06 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
To get a bone, use the <VizAvatar>.getbone() fucntion, not getchild.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
Reply


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


All times are GMT -7. The time now is 08:43 PM.


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