Sie sind nicht angemeldet.

1

Samstag, 28. Juni 2014, 21:13

Dynamic value for lookat not working/ string to int?

I try to calculate a dynamic lookat-value in vtourskin.xml. But that does not seem to work. The pano I enter only shows loading and nothing happens.
I made some debug outputs, so I know, the value for "var" is correct. When I replace get(var) in lookat with some numeric value it works.
nordung is set in the tour.xml as nordung="45"

Quellcode

1
2
3
4
5
...
trace('linkedscene nordung =  ',scene[get(linkedscene)].nordung);
set(var,scene[get(linkedscene)].nordung);
trace('var = ',get(var));
lookat(get(var),0)


Okay, seems to me, that the problem occurs, because nordung is a string, not an integer. Got NaN, when I tried to add() an int. Is there any possible conversion?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »ehs« (28. Juni 2014, 21:37)


2

Donnerstag, 3. Juli 2014, 11:06

Try using get() to the value:
set(var,get(scene[get(linkedscene)].nordung));