In which I raise a wall and encounter physical difficulties

Warning:  This article will contain arcane minutiae regarding the mysteries of conjuration and inscription, topics possibly only of interest to Sorcerers and Code Poets.  It is my hope that sharing these things as I, a mere fledgeling in these matters myself, discover them will help others on the path to enlightenment.  If you, dear reader, can learn from my mistakes, then I have fulfilled my purpose.

I have in mind another rather ambitious project on a somewhat grander scale than the sundial.  Simply stated, I hope to construct a configurable maze.  Instead of hedges, however, my maze shall be constructed of steel walls arranged on a grid that can be raised and/or lowered to form the paths of the maze.  Preferably, there will be a control panel of sorts from which one will choose from a selection of maze configurations after which the many wall sections will arrange themselves accordingly.  If not particularly difficult from a construction standpoint, I think that the coordination of movement among the several pieces will be a significant challenge.

Taking a modular approach I began with a single wall section, 10m x 0.25m x 4m .  I simply applied a suitable texture and inscribed within a copy of the door opening formula I had used in my temporary shelter construction.  This formula employs the llSetPos function.  One drawback with this is that it produces a rather abrupt change in location.  I wanted a more fluid and gradual movement that would appear more like raising or lowering a heavy iron wall.

My first attempt at modifying the movement was to change llSetPos to llMoveToTarget as the latter function includes a damping parameter.  llMoveToTarget only operates on so-called “Physical” objects; therefore, I also had to add a line that set the “Physical” property of my wall.  This gave me the desired gradual, or damped, movement.  I could raise and lower my wall with a touch and it moved in a smooth and gradual manner.   Pleased with my progress, I Took the object into my possession and went on to other diversions for a time.

When I was again ready I conjured forth (i.e. resolved, or rezzed) my wall for further experimentation.  To my surprise said wall manifested at an angle off the perpendicular and then proceeded to fly across the sandbox of its own accord.  I dissolved the misbehaving object and re-conjured it.  This time it manifested at an even greater angle and bounced to a position above my head.   Most distressing.  I suppose such behavior might be desirable if I wanted to throw a wall at someone, but for the purposes of a stationary wall, it would never do.

I determined that this behavior was due to the “Physical” property still being set.  Once I disabled it the wall behaved in a more reasonable manner, however, it remained in its skewed orientation.  I preferred not to have to fiddle with rotating and shifting my wall around unnecessarily, so, I had to insert additional lines into my formulae that would disable the wall’s physicality after it completed it’s movement.  The trick to this was including a delay, via llSleep, of sufficient duration to allow the full range of motion.  As I write this I see now that I might have employed llTarget and the at_target/not_at_target events instead.  I shall experiment with that in the future.

Published in: on 12 March, 2009 at 11:19 AM  Leave a Comment  
Tags: ,

The URI to TrackBack this entry is:

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: