Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Mirror script

SweetSexy Diamond
Registered User
Join date: 31 Mar 2005
Posts: 36
10-06-2007 12:53
Is there anyone who knows how to make a mirror script- NOT the kind to mirror a prim, but the kind where it will pose the avatar with camera in mirror view. Please get back to me. I'd appreciate it : )

Thanks
SweetSexy Diamond
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
10-06-2007 17:04
you'd need 1-2 poses, (one if bi-laterally symmetrical, 2 if not)

2 prims with sit targets, (either separate from or in addition to your mirror)

on sit, trigger anim

I guess it helps if they are both in the same skin/shape/clothing...
SweetSexy Diamond
Registered User
Join date: 31 Mar 2005
Posts: 36
Mirror Script
10-08-2007 19:20
I don't get it
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-08-2007 21:10
Haven't ever played with the camera before so this is as close as I can get it:

Create a cube and put this script in it and then sit on it. It will give an idea of the way the mirrors work by changing your camera. Create yourself a nice dressing table with mirror and bench and then put this in the bench and play with the numbers until you are happy.

CODE

default
{
state_entry(){
llSitTarget(<0.3,0.0,0.5>,ZERO_ROTATION);
llSetCameraEyeOffset(<0.3, 0.0, 1.05>);//camera position
llSetCameraAtOffset(<-0.5, 0, 1.05>);//Camera point of focus
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
10-09-2007 00:04
::smacks own forehead:: I totally misread the intent
SweetSexy Diamond
Registered User
Join date: 31 Mar 2005
Posts: 36
Mirror Script
10-09-2007 10:36
Thanks for the script- it did work- only thing I am trying to do is offset the camera at a further position so that I can get more of a view from waste up- instead of shoulders up. Any suggestions? Thanks again!

: )
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
10-11-2007 10:06
you should be able to modify these two lines

llSetCameraEyeOffset(<0.3, 0.0, 1.05>;);//camera position
llSetCameraAtOffset(<-0.5, 0, 1.05>;);//Camera point of focus

the numbers roughly mean the following

<[distance away from pose stand], [distance side to side (+ve left)],[distance up]>

so you have 3 options.

1. tilt the camera down by changing the point of focus of the camera DOWN
for example:
llSetCameraAtOffset(<-0.5, 0, 0.7>;);//Camera point of focus

2. move the camera away as you suggested by changing the camera distance:
llSetCameraEyeOffset(<2.0, 0.0, 1.05>;);//camera position

3. move the camera down toward waist
llSetCameraEyeOffset(<0.3, 0.0, 0.5>;);//camera position

I just put random numbers in there but you should be able to do anything you want. To get a waist up shot you may want to move the camera away and also tilt it down a bit:
llSetCameraEyeOffset(<2.0, 0.0, 1.05>;);//camera position
llSetCameraAtOffset(<-0.5, 0, 0.7>;);//Camera point of focus
SweetSexy Diamond
Registered User
Join date: 31 Mar 2005
Posts: 36
10-12-2007 05:34
Cool thanks!
Nathan Babcock
Registered User
Join date: 5 May 2006
Posts: 47
10-12-2007 16:55
Hey question. Can you set camera target if you WEAR and object rather than SIT on it???