OsLocalTeleportAgent
From OpenSimulator
Line 35: | Line 35: | ||
- If newPosition is outside the region the target will be at nearest region border.<br> | - If newPosition is outside the region the target will be at nearest region border.<br> | ||
- newVelocity, if selected in optionFlags bit 0, should set a avatar velocity, but may only work with ubOde Physics engine, even so results may be a bit unpredictable. It will stop if the avatar collides with anything at destination or if the user presses a movement key. It also has a fast decay. This behavior will need future changes.<br> | - newVelocity, if selected in optionFlags bit 0, should set a avatar velocity, but may only work with ubOde Physics engine, even so results may be a bit unpredictable. It will stop if the avatar collides with anything at destination or if the user presses a movement key. It also has a fast decay. This behavior will need future changes.<br> | ||
− | - newLookAt, if selected in optionFlags bit 1, changes the | + | - newLookAt, if selected in optionFlags bit 1, changes the avatar head facing direction, body will face close to that. bit 2 can alternatively be used to align the look at to the velocity at arrival if that is not Zero. Camera direction will depend on viewer camera state at teleport time (like camera attached to avatar or free). newLookAt and final lookAt is a direction and its Z is zero<br> |
- OptionFlags is a bit field:<br> | - OptionFlags is a bit field:<br> |
Revision as of 15:49, 1 May 2019
void osLocalTeleportAgent(key agentID, vector newPosition, vector newVelocity, vector newLookat, integer optionFlags)
| |
Caution ! still experimental, subject to changes Teleports an avatar with uuid agentID to the specified newPosition within same region. - OptionFlags is a bit field: | |
Threat Level | None |
Permissions | see description |
Extra Delay | 0 seconds |
Example(s) | |
vector LandingPoint = <128,128,50>; // X,Y,Z landing point for avatar to arrive at vector LookAt = <1,1,0>; // which way they look at when arriving // default { state_entry() { llWhisper(0, "OS Local Teleport Active"); } touch_start(integer num_detected) { key avatar = llDetectedKey(0); llInstantMessage(avatar, "Teleporting you to : " + (string)LandingPoint); osLocalTeleportAgent(avatar, LandingPoint, ZEROVECTOR, LookAt, 2); } } |