Jump to content

SOLVED - Moving an Object below Ground Level


katya Qork
 Share

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

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

Recommended Posts

Hi, I'm trying to create my own rezz box, and I'm struggling with getting things in the correct position if their centre is below ground level. I have a rezz box that I bought some years ago that does this, so I know it's possible. It does it, by moving the rezz box to the desired position and rotation of the object, and then rezzing the object "in place". Unfortunately, this rezz box is no longer sold or supported, and doesn't have all of the functionality that I'm looking for. Does anyone know of a way to do this? Thanks, Kat.
Link to comment
Share on other sites


katya Qork wrote: [...] I have a rezz box that I bought some years ago that does this, so I know it's possible. It does it, by moving the rezz box to the desired position and rotation of the object, and then rezzing the object "in place". [...]

And that still works? If so, then we "just" need to figure out how the rez box gets down there, and instead make the rezzed objects do that.

I can think of a hideous way that might work: llCreateLink the rezzed object to a new root prim some meters above the object's origin, push that assembly into position, then llBreakLink that root, leaving the rest underground as intended. I haven't tested this so I'm only guessing it would work -- although it would require PERMISSION_CHANGE_LINKS and the temporary linkset would have to be within the distance limits of links, and probably other hairy stuff I'm overlooking.

Link to comment
Share on other sites

Thanks.   You're right.

I was confused because I've worked on several large projects recently where I've been moving stuff "underground" until it's needed, but they've all been mesh builds, so when I've been hiding things inside a hillside, I've actually been moving them into a mesh, not underground.

Sorry about that.

Furthermore, I was also wrong about not being able to rez objects underground -- I've just tested it and it works, both when I move the rezzer underground manually, with the edit tools and when I simply rez the object 5 metres below the rezzer.

So, in that case, it should be reasonably simple (famous last words).

How are you calculating and recording the positions for the rezzed objects at the moment?   I think I would store the offsets from the rezzer in a notecard and then, at run-time, have the rezzer read that and calculate a list of destinations at run time (all relative to the rezzer's position before it starts moving), plus 5 metres on the positive z axis.

Then simpy use llSetRegionPos to move the rezzer around to each point, and have it rez the approrpiate item at each point, 5 metres below itself 

That should do it, I thiink.

Link to comment
Share on other sites

I've solved the issue.

llMoveToTarget() will move an object below the ground, but only if it is a physical object. So, my script does this:

llMoveToTarget(DESTINATION_POSITION, 0.4);
llSetPrimitiveParams([PRIM_PHYSICS, TRUE]);
llRezAtRoot(_object, llGetPos(), _speed, llGetRot(), commChannel);
llSetPrimitiveParams([PRIM_PHYSICS, FALSE]);

 

Setting the physical property after the call to llMoveTarget avoids problems with the rezzer "falling" or "bouncing" before it gets chance to rezz the object, but still works (apparently it's a known quirk).

 

Thanks for your replies.

 

P.S.

While the code above works, I decided to use Innula Zenovka's idea, as it's simpler, and probably less likeley to break in the future (better than relying upon a quirk that may one day get fixed), Code now looks like this:

llSetRegionPos(DESTINATION_POSITION + <0.0, 0.0, 10.0>);
llRezAtRoot(_object, llGetPos() - <0.0, 0.0, 10.0>, _speed, llGetRot(), commChannel);

 

Thanks Innula
 

 

Link to comment
Share on other sites


Qie Niangao wrote:

 [ .... ]I can think of a hideous way that
might
 work: llCreateLink the rezzed object to a new root prim some meters above the object's origin, push that assembly into position, then llBreakLink that root, leaving the rest underground as intended. I haven't tested this so I'm only guessing it would work -- although it would require PERMISSION_CHANGE_LINKS and the temporary linkset would have to be within the distance limits of links, and probably other hairy stuff I'm overlooking.

 As clumsy as that sounds, it might actually work.  You can certainly do something like that manually.  Rez two prims one above the other and separated by less than 54m, link them so that the root prim is the top one, and shove the lower prim well below ground level.  Then unlink them.  The lower prim stays underground.  As you say, it would be a truly awkward thing to do with LSL because of the permissions, but it could work.

Link to comment
Share on other sites

Ussualy what happens is the rezzed phyisical object fly off into the air as the grounfd physics plain recacts to it. I have no idea as to why you reqiue this but with say a sewr system water world the ground is lowered to zreo and prims used as a ground level.That way you can still raise parts thru the prim but have a void below. Could have a sewr system, would have to be above water level tho.

Link to comment
Share on other sites

In reponse to steph Arnott ...

 

Think of large mesh rocks, or sculpty rocks.

When you're landscaping, often you'll sink rocks into the ground so that just the top portion is showing (often do this with trees and flowers too) - or maybe they're on a slope, and therefore the centre is below the actual ground level. You'll probably say "make them smaller in height", but that often distorts the look and makes them look bad. 

I sell land with themed landscapes, which take a lot of effort to create, and I put my creations into a rezz box so that I can easily recreate them in seconds. I don't want to then have to go around "modifying" what I've just rezzed out of a box because loads of things are now at the wrong height. 

As I said, I do have a holodeck rezzer that I bought inworld a few years ago, that does this just fine (the only one I've ever found, that does) - but now I want to start automating things for my tenants (so they can season change their own land etc), and that rezz box doesn't have the extra functionality that I need. I've looked around at plenty of holodecks and scene rezzers, and they don't do exactly what I want - hence I decided to create my own.

Anyway, I now have somethimng that works - so I'm happy :)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3007 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...