[X3D-Public] Static HUDS in scene
Bederov, Sergey
bederov at cortona3d.com
Thu Sep 1 02:37:20 PDT 2011
Hello Lola,
Try changing your ROUTEs this way:
<ROUTE fromNode='Sensor1' fromField='position_changed'
toNode='Transform3' toField='set_translation'/>
<ROUTE fromNode='Sensor1' fromField='orientation_changed'
toNode='Transform3' toField='set_rotation'/>
or, in the big file:
<ROUTE fromNode='HudSensor' fromField='position_changed'
toNode='Transform5' toField='set_translation'/>
<ROUTE fromNode='HudSensor' fromField='orientation_changed'
toNode='Transform5' toField='set_rotation'/>
It is enough to ROUTE translation and rotation. Center is not needed.
Sergey Bederov
> -----Original Message-----
> From: x3d-public-bounces at web3d.org
> [mailto:x3d-public-bounces at web3d.org] On Behalf Of O AKINWUSI
> Sent: Thursday, September 01, 2011 5:10 AM
> To: x3d-public at web3d.org
> Subject: [X3D-Public] Static HUDS in scene
>
> Hi everyone,
>
> I would like help with a scene I am working on. I am trying to add a
> HUD to my scene but my HUD is not following the camera. It is just
> static. The address of the scene is www.virtualscim.com/VR/sceneTest.x3d.
>
> Here is the code for the HUD
>
> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE X3D PUBLIC
> "ISO//Web3D//DTD X3D 3.0//EN"
> "http://www.web3d.org/specifications/x3d-3.0.dtd">
> <X3D profile='Immersive' >
> <head>
> <meta name='ExportTime' content='2: 7:54'/>
> <meta name='ExportDate' content='9/1/2011'/>
> <meta name='VivatyStudioVersion' content='738'/> </head> <Scene>
> <Transform DEF='Transform3'
> translation='-1.01636 1.49088 -.71418'>
> <Group DEF='HUD'
> containerField='children'>
> <ProximitySensor DEF='Sensor1'
> containerField='children'
> size='1000000000 1000000000 1000000000'
> center='2.6077 5.78811 4.79059'/>
> <Transform DEF='Transform4'
> containerField='children'
> translation='0 0 -0'>
> <Anchor DEF='Offset'
> containerField='children'
> url='"VR_GeneralLab.x3d"'>
> <Transform DEF='dad_Text1'
> containerField='children'
> translation='4.50824 5.96004 4.99059'
> scale='.7609 .7609 .7609'>
> <Shape DEF='Text1'
> containerField='children'>
> <Appearance
> containerField='appearance'>
> <Material DEF='Red'
> containerField='material'
> ambientIntensity='.2'
> shininess='.2'
> diffuseColor='1 0 0'/>
> </Appearance>
> <Text DEF='GeoText1'
> containerField='geometry'
> string='"ROOMS"'
> maxExtent='0'>
> <FontStyle
> containerField='fontStyle'
> family='SERIF'
> style='PLAIN'
> justify='"BEGIN"
> "BEGIN"'
> size='1'
> spacing='1'/>
> </Text>
> </Shape>
> </Transform>
> <Transform DEF='dad_Box2'
> containerField='children'
> translation='5.69552 5.3968 4.71418'>
> <Shape DEF='Box2'
> containerField='children'>
> <Appearance
> containerField='appearance'>
> <Material DEF='White'
> containerField='material'
> ambientIntensity='.2'
> shininess='.2'
> transparency='.2'
> diffuseColor='1 1 1'/>
> </Appearance>
> <Box DEF='GeoBox2'
> containerField='geometry'
> size='2.5 1 .1'/>
> </Shape>
> </Transform>
> </Anchor>
> </Transform>
> </Group>
> </Transform>
> <Viewpoint DEF='Viewpoint1'
> description='Viewpoint1'
> jump='true'
> fieldOfView='.7854'
> position='4.5481 6.64299 17.0188'
> orientation='0 0 1 0'/>
> <ROUTE fromNode='Sensor1' fromField='position_changed'
> toNode='Transform3' toField='set_translation'/> <ROUTE fromNode='Transform5'
> fromField='rotation_changed'
> toNode='Transform3' toField='set_rotation'/> <ROUTE fromNode='Sensor1'
> fromField='position_changed'
> toNode='Transform3' toField='set_center'/> </Scene> </X3D>
>
>
>
> Thanks,
>
> Lola
> Software: vivaty and X3D-edit
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
More information about the X3D-Public
mailing list