Jump to content

Help with the sit on a chair


Devriv
 Share

You are about to reply to a thread that has been inactive for 4191 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello everyone. I'm just beginning to learn Blender by reading and watching online tutorials. I made a simple chair (without sculpting or texturing) and uploaded it to SL, but when I try to sit on it, my avatar sits quite a few centimeters/inches above where it's supposed to rest (This happens with or without my AOs). I wanted to know whether the cause was something I had overlooked in Blender itself, or a setting in the uploading process I may have ignored. Thank you for your help.

Chair1.pngMesh Chair.png

Link to comment
Share on other sites

You're just sitting on the bounding box.  That's all.  You'll need to put a sit target in the chair.  If you're very lucky, this might do it...

default{    state_entry()    {        llSitTarget(< -0.2,0.0,-0.2>,ZERO_ROTATION);    }}

I'm just guessing from the photo that you need to move back and down about 0.2m, and I'm assuming that the +X axis is pointing out the front of the chair.  If those guesses are off a little bit, you can change the numbers.  If I guessed the rotation wrong, you'll have a little more fun. :smileyvery-happy:  When you're done, remove the script.  It won't be needed any more.

 

 

  • Like 1
Link to comment
Share on other sites

Thank you so much Rolig, Drongle, and Dora :)

I finally managed to get it just right using the Sit-Target method. Your replies not only helped me resolve this issue, but clarified other points.

Drongle, I am very interested in the method you suggest, as I would like to have the option of making the sits possible during the modeling stage too. After fixing the sit on that chair, it was only on closer inspection that I noticed the bounding rectangular box as Rolig pointed out, what's referred to as the “physics shape” if I'm not mistaken. I had made the chair using only one mesh cube. So I made another chair, this time using two mesh cubes (one for the seat and legs, the other for the back). I didn't even “join” them, as I don't know how, and made the Collada. After rezzing it inworld, the sit was perfect! :) Also it had a land impact of 1, as either the default convex hull or when I changed the physics shape to prim. (When changing the other chair to prim, it gave me a prim count of more than 100!!) But now I'm wondering if this is in fact what you meant in your reply. Reading on the subject I also saw several references to uploading one's own physical model in addition (?) to what is being uploaded, but that seems to me for the much more experienced builders.

Link to comment
Share on other sites

Physics shapes are no difficult. Just make sure they fit the same bounding box as the visible mesh. Then add them on the physics tab of the uploader. Simplest is to use non-overlapping simple shapes, but all in one mesh, and click the "Analyse" button. You still have to set shape type to "Prim" inworld to use it. You can use the simple physics with the more complex visual mesh to keep the LI low while still having complex visible shape.

From what you say, I guess you were using two separate box meshes? If you specify a physics mesh and don't press "Analyse", you get a triangle-based physics shape. This gets much more expensive very rapidly if it has small triangles, which would be the case for thin legs. Even if you did use "Analyse", the chair legs would still give you a shape made of many convex hulls (use explode view to see them), whch can also be expensive. The rule is to use a simple shapes as possioble to get the collision behaviour your object needs, and to use "Analyze" unless the object is very large (landscapes and buildings, for example).

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4191 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...