You are not logged in.

1

Thursday, June 8th 2017, 2:49pm

Dynamic view orientation of a scene

<plugin name="scene_winter" url="winter_icon.png"... onclick="loadscene(scene_winter); set(view.hlookat,90);" />
If the icon is clicked, the new scene (scene_winter) is shown. It is 90 degree shifted,
but I like to have that dynamically the same value as the current scene at the moment the
winterr_icon is clicked.

(Instead of 90, there should be the view.hlookat from the current scene)
I think it should be easy but how is it done?
I appreciate your help!

The following statment woks as well, but if I replace the "90" by "view.hlookat", then it wil not work.
<plugin name="scene_winter" url="winter_icon.png" ... onclick="set(orient,90); loadscene(scene_winter); set(view.hlookat,get(orient));" />

This post has been edited 3 times, last edit by "Letus" (Jun 10th 2017, 9:08am) with the following reason: The following statment woks as well, but if I replace the "90" by "view.hlookat", then it wil not work. <plugin name="scene_winter" url="winter_icon.png" ... onclick="set(orient,90); loadscene(scene_winter); set(view.hlookat,get(orient));" />


2

Saturday, June 10th 2017, 7:31pm

Here is a solution from a friend of mine.
Instead of onclick="loadscene(scene_winter); set(view.hlookat,90);"
write:
onclick="loadscene(scene_winter,null,MERGE|KEEPVIEW,BLEND(1))"

And I noted: without the BLEND(1), it is notr working. Just the KEEPVIEW is not sufficient.

Hope this infomation is valuable for you as well.