Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-24 20:13:22



Reply to topic  [ 4 posts ] 
New Lua Camera Control 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
I'm having a bit of trouble with the new SetCameraMode, SetCameraFocus and the old GetCameraMode. I may just be confused on terminology.

Firstly when doing in default, what I call first person view:
Code:
/lua print(GetCameraMode())
always returns zero. I get one and two in mouse look and appearance edit, respectively. I would expect those values from inspecting the enum in indra/newviewer/llagent.h. It seems there might not be a value for 'default, first person view' because it really is 'third person view'?

Secondly, I cannot seem to change to third person view with:
Code:
/lua print(SetCameraMode(0))
to change the camera, though the output is true when attempting. Using the values one, minus one and minus two do mouse look, default and reset (though I can't really tell the difference in those last two). Again, I may be confusing this mode with 'Camera Front View', debug setting CameraFrontView?

Finally, and this is probably just cosmetic:
Code:
/lua print(SetCameraFocus())
has no output though it does return the focus to my avatar when shifted elsewhere.

I'm using today's official build with the following:
Code:
Cool VL Viewer v1.28.2.8, 64 bits, Feb 13 2021 11:33:21
Release Notes

You are at 308951.0, 235503.0, 650.5  in Bugle located at
simhost-0aabe6ca58c40d419.agni.secondlife.io (52.38.29.231:13013)
Alias: ec2-52-38-29-231.us-west-2.compute.amazonaws.com
Second Life Server 2021-02-01.555570
Release Notes

CPU: AMD Athlon(tm) X4 880K Quad Core Processor (4030.51 MHz)
Memory: 32133MB
OS version: Linux-x86_64 v5.10.14-200.fc33.x86_64 #1 SMP Sun Feb 7 19:59:31 UTC 2021
Memory manager: jemalloc v5.2.1-20210212
Graphics card vendor: NVIDIA Corporation
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2
OpenGL version: 4.6.0 NVIDIA 460.39
Detected VRAM: 11264MB
J2C decoder: OpenJPEG: 1.4.0.635f
Audio driver: OpenAL v1.1 ALSOFT 1.19.1 (OpenAL Soft: OpenAL Soft)
Networking backend: libcurl/7.47.0 OpenSSL/1.0.2u zlib/1.2.11
Embedded browser: CEF3 plugin v88.2.4+gf3c4ca9+chromium-88.0.4324.150
Packets lost: 0/9953 (0.0%)

Built with: GCC v5.5.0
Compiler-generated maths: SSE2.

Compile flags used for this build:
-O3 -fno-delete-null-pointer-checks -fno-ipa-cp-clone -fno-align-labels -fno-align-loops -fsched-pressure -frename-registers -fweb -fira-hoist-pressure -DNDEBUG -std=c++14 -fno-stack-protector -fno-threadsafe-statics -fPIC -pipe -g -gdwarf-2 -gstrict-dwarf -fno-var-tracking-assignments -fexceptions -fno-strict-aliasing -fvisibility=hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -Wall -Wno-reorder -Werror -DLL_LINUX=1 -D_REENTRANT -DXML_STATIC -DLL_USE_JEMALLOC=1 -DLL_ELFBIN=1 -DOV_EXCLUDE_STATIC_CALLBACKS -DLL_FMOD=1 -DLL_OPENAL=1 -DLL_SDL2=1 -DLIB_NDOF=1 -DLL_X11=1

and log:


Attachments:
CoolVLViewer.zip [22.93 KiB]
Downloaded 102 times
2021-02-13 18:20:04
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
ZaneZimer wrote:
Firstly when doing in default, first person view:
Code:
/lua print(GetCameraMode())
always returns zero. I get one and two in mouse look and appearance edit, respectively. I would expect those values from inspecting the enum in indra/newviewer/llagent.h.
This is the expected behaviour and reflects exactly how camera modes are implemented internally in the viewer.

Quote:
It seems there might not be a value for 'default, first person view'?
You are confusing camera focus and camera modes.

Quote:
Secondly, I cannot seem to change to third person view with:
Code:
/lua print(SetCameraMode(0))
to change the camera, though the output is true when attempting .../...
The function works accordingly with the documentation, please re-read it and, again, do not confuse camera modes with camera focus... Basically SetCameraMode() is only useful to switch to and out of mouse look and to reset the camera view (like with SHIFT ESC).

Quote:
Finally, and this is probably just cosmetic:
Code:
/lua print(SetCameraFocus())
has no output though it does return the focus to my avatar when shifted elsewhere.
This function never returns any value. That was a mistake in the documentation which I fixed now.


2021-02-13 18:36:49
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Thanks Henri. I think I have always though of the 'direction' the camera was facing, first person...the back of my head and third person...looking at my face. In strict terms though, they are both third person, i.e. not out of my own eyes.

My misunderstanding, really. Sorry to create a message thread for nothing.


2021-02-13 18:42:29
Profile

Joined: 2009-03-17 18:42:51
Posts: 5550
Reply with quote
ZaneZimer wrote:
My misunderstanding, really. Sorry to create a message thread for nothing.
It was not for nothing, since I did indeed a mistake in the documentation, which I noticed thanks to your message. :P


2021-02-13 20:04:07
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.