Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008174opensim[REGION] Physics Enginespublic2017-05-21 14:392017-05-21 15:40
Assigned To 
PlatformOperating SystemOperating System Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008174: Teleport doesn't put agent at expected height (ubODE)
DescriptionOn ubODE whenever teleporting from the map or via osTeleportAgent() the agent does not land at the desired specified height if the target coordinates would normally land them inside of a structure (such as a building). Instead it puts them on top of the structure no matter what. It doesn't seem to matter what structure it is they will always land on top of it.

This does not seem to affect teleport invitations from other agents, double click teleport, or teleport via radar as some TPVs support; Only from map or osTeleportAgent()

This also does not appear to affect the original ODE or BulletSim physics; works as expected
Steps To Reproduce1. Open the large map and set a coordinate inside of a structure at a specific height

2. Teleport; The agent will not land at the specified height but instead on top of the structure


1. Use osTeleportAgent() to teleport an agent inside of a structure at a specific height; The agent will not land at the specified height but instead on top of the structure
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineubODE
Script Engine
Environment.NET / Windows64
Mono VersionNone
Attached Files

- Relationships

-  Notes
UbitUmarov (administrator)
2017-05-21 14:46

yes that is a feature that only works with ubOde to prevent landing inside prims
Visitors do not know correct height to land inside a building
the code does try to guess clear place inside a building, but possible needs more tuning.
Malls, etc should use landing points/telehubs to place visitors on nice safe places.
mewtwo0641 (reporter)
2017-05-21 14:51

It kind of breaks usability of osTeleportAgent() though since the person writing the script probably does know an exact coordinate of where they want the agent to land if they're using it; That is to say it limits the use of this function quite a bit if it can now only accurately teleport an agent somewhere where there are no structures/buildings. Would it be possible to add an exception for this function in ubODE?
UbitUmarov (administrator)
2017-05-21 14:55

for the receiving region soTP is just a tp :(
guess the safe location code does need a bit more complexity :)
btw only works with ubOde bc only ubOde provides sensing tools (rays)
BillBlight (developer)
2017-05-21 14:57

I just tested this on the latest master, and I can tp inside buildings fine.

I think the caveat here is, you must make sure the landing point gives sufficient space for the avatars feet(capsule) to not end up in the floor or ceiling.
mewtwo0641 (reporter)
2017-05-21 14:59

I've noticed that if I set the "roof" of the structure to phantom or Physics shape to None on it then they land properly although I can't really tell if they actually are landing in the right spot or they're still landing in the air but are falling through to the floor too quickly for me to tell before the teleport screen goes away. This obviously only works for single story structures though.
BillBlight (developer)
2017-05-21 15:02

I just tested this to tp to the first and second floor of a structure, and yes you have to know a "good" set of coordinates.. To paraphrase start trek, "You don't want to beam them into a wall" ...
BillBlight (developer)
2017-05-21 15:06
edited on: 2017-05-21 15:14

I wonder if adding
vector agentsize = llGetAgentSize(WhomToTeleport);
float landingadjustment = agentsize.z /2;
to the landing position would help this ...
(for instance to NOT land in the floor)

(realized that was bad code, fixed it)

mewtwo0641 (reporter)
2017-05-21 15:08
edited on: 2017-05-21 15:13

Okay... I think I have come up with a clearer picture on how it happens. Apparently if you're teleporting within the same region then it's fine and works as it should. But if coming from a different region and the target coordinates are inside a structure then it lands you on top of it instead of inside.

For reference I'm using this script for testing with your suggestion of using agent size as an offset:

    touch_start(integer num)
        vector avSize = llGetAgentSize(llDetectedKey(0)) / 2;
        float x = 81.0;
        float y = 204.0;
        float z = 33.0 + avSize.z;
        osTeleportAgent(llDetectedKey(0), "Sandbox", <x, y, z>, ZERO_VECTOR);

It works fine still within the same region but not when targeting inside a structure coming from a different region

UbitUmarov (administrator)
2017-05-21 15:15

There is some naïve code to detect high roofs and ignore them
guess that code need improvements, just I only want a single physics sense operation there, and that does restrict things.
Later ubOde does not shoot you across several regions if you land overlapping a prim as much as before.. but can still do it.
UbitUmarov (administrator)
2017-05-21 15:17

idea is also to land on roofs of private homes, not inside them.
High roofs are typical of public spaces meeting spots...
mewtwo0641 (reporter)
2017-05-21 15:24

Understandable but it's not an every-use case; For instance we use my grid for roleplay and the teleport system I wrote for interconnecting regions places us inside of structures such as caves, buildings, etc. Which work fine on other physics engines but not ubODE which we would like to use due to the better working physics it provides.
BillBlight (developer)
2017-05-21 15:33

yes mewtwo0641 I was just testing in the same region, I can now understand your pain. I can see where this could be very inconvenient. Yet there has to be a comfortable medium, as I fully understand where Ubit was coming from , kind of stopping people from landing inside peoples houses.
UbitUmarov (administrator)
2017-05-21 15:34

worse.. preventing them from getting trapped inside a prim or been shoot like a cannon ball several regions away ;)
BillBlight (developer)
2017-05-21 15:37

You know Ubit, sometimes you take all the fun out of it ... ;)
mewtwo0641 (reporter)
2017-05-21 15:40

Being shot out of a prim like a human cannon ball can be fun lol

- Issue History
Date Modified Username Field Change
2017-05-21 14:39 mewtwo0641 New Issue
2017-05-21 14:46 UbitUmarov Note Added: 0031903
2017-05-21 14:51 mewtwo0641 Note Added: 0031904
2017-05-21 14:55 UbitUmarov Note Added: 0031905
2017-05-21 14:57 BillBlight Note Added: 0031906
2017-05-21 14:59 mewtwo0641 Note Added: 0031907
2017-05-21 15:02 BillBlight Note Added: 0031908
2017-05-21 15:06 BillBlight Note Added: 0031909
2017-05-21 15:08 BillBlight Note Edited: 0031909 View Revisions
2017-05-21 15:08 mewtwo0641 Note Added: 0031910
2017-05-21 15:13 mewtwo0641 Note Edited: 0031910 View Revisions
2017-05-21 15:14 BillBlight Note Edited: 0031909 View Revisions
2017-05-21 15:15 UbitUmarov Note Added: 0031911
2017-05-21 15:17 UbitUmarov Note Added: 0031912
2017-05-21 15:24 mewtwo0641 Note Added: 0031913
2017-05-21 15:33 BillBlight Note Added: 0031914
2017-05-21 15:34 UbitUmarov Note Added: 0031915
2017-05-21 15:37 BillBlight Note Added: 0031916
2017-05-21 15:40 mewtwo0641 Note Added: 0031917

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker