WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-19-2003, 11:59 AM
FlyingWren FlyingWren is offline
Member
 
Join Date: Mar 2003
Location: Fargo, North Dakota, USA
Posts: 48
3D sound & child objects

Phenomenologically, 3D-sound played from objects loaded with viz.add() seem to be generated from the correct position. However, 3D-sound playback from objects loaded with viz.getchild() seem to be at the wrong position. For example,


objRoom = viz.add('Room.wrl')
objVent = objRoom.getchild('obj_Vent')

# start sound playing
objVent.playsound('air-vent.wav', viz.LOOP)


The 'air-vent' wave file seems to be playing at the position of the "Room" object, not the actual "Vent" subobject.
Reply With Quote
  #2  
Old 09-19-2003, 12:13 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

This is due to the fact that objVent is at position (0,0,0) relative to its parent objRoom. I believe this has been fixed in 2.11, which computes the objects position relative to world coordinates by adding all the translations of its parents. For now you could do the following:

Code:
# Create a GROUP object which is simply a child object that has no geometry.
vent = viz.add(viz.GROUP)
vent.translate(x,y,z) #place the object at the vents true location
vent.playsound('air-vent.wav',viz.LOOP)
By the way, we should be releasing 2.11 today or Monday, sorry for the delay.
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


All times are GMT -7. The time now is 04:54 PM.


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