虚拟现实VrmPad怎么实现不了我要的功能啊?哪儿出错啦?

来源:百度知道 编辑:UC知道 时间:2024/05/15 06:44:26
我想让top盒盖第一次拉开看到球,第二次拉开盒盖看不到,依此更替,像魔术的效果,但我做不出来,要崩溃了!!!大伙帮帮忙啊!
#VRML V2.0 utf8
Background {
skyColor 0.9 0.9 0.7
}
Group {
children [
Shape {
appearance Appearance {
material DEF ball Material {
emissiveColor .9 .5 .1
shininess .5
}
}
geometry Sphere {
radius 0.5}
}
Transform {
translation 0.0 -0.55 0.0
children [
DEF bottom Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 0.5 0.9
shininess 0.5
}
}
geometry Box {
size 3.0 0.1 3.0
}
}
Transform {
translation -1.45 1.45 0.0
children [
DEF left Transform {
rotation 0 0 1 1.571
children [
USE bottom ]
}
Transform {
translation 2.9 0.0 0.0
children [
USE left ]
}
]
}
Transform {
translation 0.0 1.45 -1.45
children [
DEF back Transform {
ro

ProximitySensor是替身或视点接近所设区域的传感器节点,不是物体与物体。在这里不适合用它。

随便改了改
#VRML V2.0 utf8

Background {
skyColor 0.9 0.9 0.7
}
Group {
children [
Shape {
appearance Appearance {
material DEF ball Material {
emissiveColor .9 .5 .1
shininess .5
}
}
geometry Sphere {
radius 0.5}
}

]
}
Transform {
translation 0.0 -0.55 0.0
children [
DEF bottom Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 0.5 0.9
shininess 0.5
}
}
geometry Box {
size 3.0 0.1 3.0
}
}
Transform {
translation -1.45 1.45 0.0
children [
DEF left Transform {
rotation 0 0 1 1.571
children [
USE bottom ]
}