SL Teleport

May 8, 2008 · Filed Under Second Life · Comment 

The lack of a sound teleport function in Second Life has become a major frustration. I wrote a basic teleport script using the llSitTarget() hack. This worked well for short range distances, say anything under about 50 meters. However, when I implemented this over longer ranges of about 100m, some strange side-effects started to appear. The teleporting avatar would appear underground by more than 70m or off the sim by more than 100m. After 3-5 seconds, the avatar would snap to the correct position. This would certainly be confusing the many users.

On some teleports, the camera would start moving from the source to the destination, but stop mid-way, even though the avatar completed the trip. Using the moving keys would snap the camera to the correct position behind the avatar, but still not a good user experience.

Don’t even get me started on dealing with rotations in the llSitTarget() function. I could certainly be implementing them wrong, I’ve gotten some to work properly, but most do not. It seems to depend a great deal on the local rotation of the object. I’ve even had some chairs where two of the vector floats controlled the same axis! This limited me to rotating a sit target in two dimensions. I could rotate left-to-right and side-to-side, but not front-to-back.

I also tried implementing the popular warpPos function, which sits the avatar on a prim, moves the prim in 10m increments to the destination and then unsits the avatar. This worked, but exhibited the same unusual side-effects.

I also tested a number of commercial teleport solutions and they all exhibit the same side-effects.

Of course, llMapDestination() is the official method for teleporting. However, this simply brings up the full map with the target destination highlighted. The user is required to click the Teleport button among a sea of options. The map is a powerful tool, but completely overkill when you simply want to teleport to a specified destination.

A simple function would address all of these issues:

llTeleportAgent(vector targetLocation, float targetCompassFacingInDegrees, integer showMap)

I know there are security concerns that need to be addressed, but it’s hard to imagine creating mass-appeal for this environment when such basic issues persist.