Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Is this possible via scripting? (Advanced Question)

Juralp Grun
Registered User
Join date: 15 May 2008
Posts: 126
06-21-2008 12:14
Please read the entire post before commenting. If you do not know how to help, do not reply. This is a serious question.

I tried out "Mouselook" with Avatar Rendering. It's great, but I noticed it's rather inaccurate. "How so?" you may ask. True, they got the height to scale with the avatar correctly, but if you're facing the side of your character, the position of the X-axis camera is off by about 4-5 inches. It doesn't sound like alot, true, but seeing as it's first person, I find it very noticable, and annoying.

The best way for you to see this for yourself is to do this:
I assume you are sitting in a chair to read this. If not, sit down. Now look straight down. You are able to see your upper torso chest area, and everything below it.
Go into second life, find a bench or something to sit on, and look down. You can only see your legs and feet, nothing else unless you move strangely. This also applies while walking, running, or anything else.

Here is a picture I found on the itnernet, modified to show what I mean:

Here is the way it should be on the x axis. Where the lines meet is where a normal person sees things:


Here is the way second life seems to place the camera, again, where the lines meet is where the camera is:


There are a possibility of 3 ways I can think of to fix this.
1 - Make a script to move the Mouselook camera, or even third person camera to be correctly positioned, about 4-5 inches to the right on the x axis from the latter picture axes (not sure on what axes SL uses).
2 - Assuming looking straight up is a 0 degree angle, and looking straight down is a 180 degree angle, if the camera can be modified to go to 185 or so (as a Real Life human can do), that would also fix this problem, because the body would be visible as a real person's is at that angle.
3 - Somehow make a body with a script and/or position that would move the entire avatar itself foward by 4-5 inches. This way would require no camera modification.

Are any of these 3 ideas actually possible? If so, can someone please try it when you're not too busy? If none of them are possible, is there anyway you can think of that might be?

Thank you.


EDIT: I found this from another thread:

llSetCameraEyeOffset(<-0.5, 0, 1> );
llSetCameraAtOffset(<30.0, 10, -2.0> );

To supposedly fake Mouselook. This would work well, but can someone tell me what the difference between the 2 is? Also, I assume sicne this is essentially third person, the mouse would not bind to looking. Is there a script which will enable binded mouse movement, but still possible to move objects, create objects, right click, all that stuff?

EDIT 2: Wait, the above edit seems to be for objects only. What if I attach a script like that to a shirt or something i'm wearing? Would that work?
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
06-21-2008 14:28
Camera controls will allow you to specify both focus point and camera point, either relative to av position or absolutely. Perhaps you would be advised to look at the appropriate functions[url].
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Juralp Grun
Registered User
Join date: 15 May 2008
Posts: 126
06-21-2008 15:07
From: Ordinal Malaprop
Camera controls will allow you to specify both focus point and camera point, either relative to av position or absolutely. Perhaps you would be advised to look at the appropriate functions[url].


Wow, tons of camera commands. I'm new to SL, needless to say new to LSL, so I do not understand how to use any of it. Could someone please tell me how to possible set it where it's actually accurate?
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-21-2008 15:54
From: Juralp Grun
Is there a script which will enable binded mouse movement, but still possible to move objects, create objects, right click, all that stuff?
Several problems here. The scripted camera doesn't apply to Mouselook ("first person" cam). One could indeed use llSetCameraParams() to make an arbitrarily positioned and oriented non-Mouselook cam, but it's not going to swivel around with the mouse: there's no way for a script to see those mouse motions, and even if it could it would be incredibly slow and jerky, running on the server as all scripts do.

The second problem is that having the mouse bound to cam movement is of very specialized utility. Consider what actually happens when trying to Edit or Create an object in Mouselook. (You can: hold down the Alt key while in Mouselook and press the right mouse button for all the familiar pie-menu choices.) Now we've got an object in Edit, we stretch a dimension of the object--whoops!--we moved the mouse, so should the cam swivel along, as in normal Mouselook? (It doesn't. Instead one ends up in a kind of brain-damaged hybrid of Mouselook and normal mouse/cam behavior.) Maybe a consistent and usable mouse/cam-motion semantics could exist for this, but it's not obvious to me, anyway.

I suspect that a custom viewer might be able to just offset the Mouselook cam as desired, but that's just a hunch. I'm not finding any apparently-relevant viewer debug settings in the standard viewer.
_____________________
Archived for Your Protection
Varun Blitz
Registered User
Join date: 22 May 2008
Posts: 62
06-23-2008 05:40
buddy,
i don't know whether i am helping u or not, but that fake mouselook thing u took from my post, i guess, where i asked for an object to follow mouse movement.
i have made that thing in needed successfully. there is a lag ofcourse as setpos itself lags in .2 sec in successive calls, but i actually made that script which senses mouse movements and makes an object follow mouse in mouselook. it stops moving when mouseluk is over.