Sie sind nicht angemeldet.

1

Samstag, 7. Oktober 2023, 07:00

<autorotate>

Hi there.
I'm implement autorotate func for autotour feature.
First I will call the nextScene function which will load the scene and rotate the pano using autorotate.
In the onautorotateoneround event, I will call the nextScene function in it. It works fine when I don't change the hlookat value when loading the scene. I want to set the hlookat value for each scene and rotate from that angle but it seems that the onautorotateoneround function is called multiple times and it switches to other scenes immediately.
Do you guys know how to fix it?

kme

Fortgeschrittener

Beiträge: 310

Wohnort: Belgium

Beruf: Long time coder, product manager and 3D enthousiast

  • Nachricht senden

2

Samstag, 7. Oktober 2023, 10:38

would be better if you shared code

3

Samstag, 7. Oktober 2023, 11:09

would be better if you shared code
In nextScene im calling this to change hlookat and loadscene
tween(view.hlookat, get(sceneHlookat), 0.1, easeinoutquad);
loadscene(get(scenename), null, MERGE|KEEPVIEW, COLORBLEND(2.0, 0x000000, easeOutSine));
And this is event: <events name="local_event" keep="true" onautorotateoneround="nextScene()"/>
I think changing hlookat will trigger onautorotateoneround