Nany Kayo Posted March 12, 2011 Share Posted March 12, 2011 Scripted doors seem to be made with a half-invisible prim that has a kind of bounding box side mirrored onto it. The door rotates around the center between the visible and invisible parts. How do I make one of those prims? Thanks. Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted March 12, 2011 Share Posted March 12, 2011 Rez a box, adjust the cut-begin and cut-end values in the edit-window until it's only "half there" (begin 0.125 and end 0.675 if I remember rightly). Then make it thin so the axis (centre point) is on the side of what looks like a door. Texture as required. As prims rotate around their centre-point this makes it appear as if the door is actually rotating around it's "hinge" edge Link to comment Share on other sites More sharing options...
Nany Kayo Posted March 12, 2011 Author Share Posted March 12, 2011 ha! I should have guess that : ) Thanks so much! Link to comment Share on other sites More sharing options...
Pauline Darkfury Posted March 12, 2011 Share Posted March 12, 2011 Doing a 50% path cut works, as Peter suggests. If you have a thicker door, or are a little obsessive about detail, a 25% path cut works better, as it puts the hinge on the corner, not the middle of that side. Use one of the following path cuts if you'd prefer that: B=0.125, E=0.375 B=0.375, E=0.625 B=0.625, E=0.875 Link to comment Share on other sites More sharing options...
Void Singer Posted March 13, 2011 Share Posted March 13, 2011 And I might as well give you the simplest script for a hinge..... integer gFltDeg = 90; //-- rotation in degrees.rotation gRotRad; //-- rotation in radians.default{ state_entry(){ gRotRad = llEuler2Rot( <0.0, 0.0, gFltDeg * DEG_TO_RAD> ); } touch_end( integer vIntTch ){ llSetLocalRot( (gRotRad = ZERO_ROTATION / gRotRad) * llGetLocalRot() ); }} stretch doors on the x axis, stretch cabinents/lids on the y axis, z axis is always height. settings always: box, path cut 0.5 +/- 0.125 (AKA [0.375/0.625]) works at any angle, linked or not, flip the object in edit if you need a hinge that goes the opposite way caveat: door should be closed when the script is added or if you manually reset the script. ETA:might help if I consistently named variables. ETA:might help even more if I actually tested it instead of trying to write from memory... fixed Link to comment Share on other sites More sharing options...
Recommended Posts
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