Thanks a lot for the reply!!!
If I put this NavigationInfo Node and some Viewpoint Node in a Transform Node just like that:
DEF CAMTRANS
Transform {
translation 0 0 0
children [
DEF AVATAR Viewpoint { orientation 0 1 0 0
position 0 25 0
description "AVATAR"
jump TRUE
]
}
can I get the camera orientation later and use it as orientation for AVATAR Viewpoint?
Regards
Stoyan
...
I create some NavigationInfo:
DEF NAVIGATION_INFO
NavigationInfo { avatarSize [0.5, 25, 10, 3, 3, 0, 11 ] speed
2.0 headlight TRUE type ["WALK", "NONE"]}
How can I switch between the two types: "WALK" and "NONE"?
...
#VRML V2.0 utf8
DEF NAVIGATION_INFO NavigationInfo {
type ["WALK", "NONE"]
}
DEF main_TS TouchSensor {}
Shape {
geometry Cone {}
}
DEF main_SCR Script {
eventIn SFTime go
field SFNode NAVIGATION_INFO USE NAVIGATION_INFO
url "javascript:
function go(){
var tmp_str0 = NAVIGATION_INFO.type[0];
var tmp_str1 = NAVIGATION_INFO.type[1];
NAVIGATION_INFO.type = new MFString(tmp_str1, tmp_str0);
}
"
}
ROUTE main_TS.touchTime TO main_SCR.go