7 July 2012

CMT3313 - Week 15 Post - Second Life - Building a Chair

Second Life Bench
Following the door object I had created in my last post, I felt I had gathered enough experience in using the Second Life Viewer's tools to create another object on my list of thing to do. Therefore I decided to create a bench on which an avatar can sit on.








Building It!
I started out by creating four identical bench feet by first creating one and then held down the shift key and moved the prim to create an exact copy of it. I repeated this process for all fours.

Bench Feet


Then I created the base and back out of two boxes, stretched and flattened them out as required and positioned them appropriately.

Base & Back
Now a wooden bench isn't very comfortable isn't it, so I added some cushions on the back and base of the bench and gave them a red colour just to make it took a bit better.
Cushions
After I was happy with the way it looked I linked all the parts together to make one, but I left the base cushions out as these I want to treat as three separate seating positions, otherwise the bench would be only available for a single person to sit on.
Linked Prim except for base cushions
Scripting It!
The final step now is to sit on the object I have create. By default second life offers the functionality to sit on any prim but this might not always have the desired result as the image below clearly shows

Unnatural way of sitting isn't it?
To overcome this I had to create a script in each of the base cushions which determines the exact point where the avatar will sit on the prim and a what rotation.


llSitTarget(<0.4,0.0,-0.60>, <0.0,0.0,180,0.0>;


I must say, at least these things are really easy to script as so many functions already exist in second life that you rarely have to have to create your own.


Final Result

No comments:

Post a Comment