Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

WarpPos: pre-calc hills? also, camera probs

bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
03-01-2007 11:46
I am using WarpPos() in a couple of sims that have high hills. Naturally, I
cant move my prims through them, so I need to figure out waypoints
to go up and around (and I'd store those in a notecard or some other config,
because we dont want to keep the user waiting while we figure out the
"safe route" :-)

Has anyone automated this? i.e.: given two points, calculate the waypoints
so that you dont go warping into the side of a hill.

My other question: coming out of WarpPos for some destinations, the camera
is underground/underwater pointing up. What can I do to stabilize it?
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
03-01-2007 13:15
well, one approach would be to go straight up to 513m, go to location, and then go down again. No land guaranteed.

the fast warp pos script sets up a single operation to execute a list of 10m jumps. You can't really know the height until you get there.

Instead of instant TP, some scripts put you in a chair or hot air balloon or whatever, and go slowly. With this, you could use a loop, and adjust for the ground at each little jump.

good luck
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
03-01-2007 13:17
Answer to first question:

Compute a path that goes up to some ridiculous height (like 768m), and back down again. Or up over and down. Takes more steps, yes, but the user won't know the difference.

Answer to second question:

I've never experienced that happening, so I can't say for sure how to make it stop. It sounds like you have your camera focused on some spot, detached from your av. Normally, moving your av after TPing should restore it. If this is the case, there's nothing you can do to fix it, since it is a viewer design issue.
bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
03-01-2007 13:50
@ Talarus Luan

Thanks.. yes, I suppose I will put a flag in my configuration to do the up and over bit.. 2 or 3 calls to WarpPos(). Don't need it for flat sims.

As for camera (it's not a camera issue per se) - here's what is happening: position is momentarily displayed as 0,0,0. It resolves itself after a couple of seconds, and then the AV ends up at the correct target. This happens sometimes when the TP is a fairly long intra-sim point to point distance.. say 100M +

So the question now becomes:

How to minimize the 0,0,0 effect? I really dont want to have to explain 'just be patient for a second or two' to the users.
Merlin Alphabeta
Registered User
Join date: 12 Feb 2006
Posts: 83
03-10-2007 05:08
Oh don't you hate a scripter that has to drag up an old discussion?

There is in fact a function that tells you the ground height at an arbitrary location in your sim - but can't be used for crossings.

You could try to figure something out that way, but look out for local maxima...