• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-1179
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Andrew Linden
Reporter: Seifert Surface
Votes: 159
Watchers: 19
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

(Havok 4) llPushObject applied to avatars is inconsistent

Created: 12/Jan/08 12:24 AM   Updated: 21/Mar/09 03:29 PM
Return to search
Component/s: Physics
Affects Version/s: Havok4 Beta
Fix Version/s: None

File Attachments: None
Image Attachments:

1. avatar_push_data.png
(7 kB)
Issue Links:
Duplicate
 
Relates
 

Linden Lab Issue ID: DEV-8885
Linden Lab Internal Branch: havok4-8


 Description  « Hide
I've been testing my transport system again, and everything seems to be working fine for dynamic prims (single and linksets).

Avatars are behaving strangely inconsistently though. The setup is as follows:

I have a volumedetecting prim which on collision, gives the object that falls into it a push calculated to give it a horizontal velocity of exactly 10 m/s. I drop my avatar into it, wearing an object that records the first time the horizontal velocity gets above 1m/s, and tells me that horizontal velocity that it gets. This should always return 10.0 when it hits the pusher and, and with dynamic prims it does, out to 5 decimal places. With avatars it is very strangely inconsistent. This is a sample of my data:

[23:57] test pushes: 9.811794
[23:57] test pushes: 10.002684
[23:57] test pushes: 10.003022
[23:57] test pushes: 9.749023
[23:57] test pushes: 9.749105
[23:58] test pushes: 9.625697
[23:58] test pushes: 9.877037
[23:58] test pushes: 9.940375
[23:58] test pushes: 9.939623
[23:58] test pushes: 10.003778
[23:58] test pushes: 10.003645
[23:58] test pushes: 9.749612
[23:58] test pushes: 9.687874
[23:58] test pushes: 10.005015
[23:58] test pushes: 9.812495
[23:58] test pushes: 9.749736
[23:58] test pushes: 9.687205
[23:58] test pushes: 9.940044
[23:58] test pushes: 9.812558
[23:59] test pushes: 10.004038
[23:59] test pushes: 9.625619
[23:59] test pushes: 9.939420
[23:59] test pushes: 9.750255
[23:59] test pushes: 10.004878
[23:59] test pushes: 10.003636
[23:59] test pushes: 9.625620

The attached image plots some of this collected data (about 120 consecutive tests). There doesn't seem to be a local pattern, but there are very clear bands of velocities that we get, rather than random fluctuations. Quantised energy states?! I have no idea what's going on here!

These all have the avatar dropped from the same position (I'm moving there with llMoveToTarget then falling), and I'm also checking that the energy in the pusher prim isn't getting expended (it is always at 1.0 before the push and something bigger than 0.25 after). The same test done with an avatar sized prim looks like this forever:

[0:01] test velocities object: 9.999998
[0:01] test velocities object: 9.999998
[0:02] test velocities object: 9.999998
[0:02] test velocities object: 9.999998
[0:02] test velocities object: 9.999998



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Harleen Gretzky added a comment - 12/Jan/08 08:37 AM
It would be interesting to see these results in Havok 4.

Seifert Surface added a comment - 12/Jan/08 09:11 AM
Oh oops, forgot to say that this is all testing in Havok 4, everything works as expected in Havok 1. I updated the summary to fix that.

Lex Neva added a comment - 12/Jan/08 10:14 AM
Haha, wow. That graph is rather enlightening. I remember talking with Andrew Linden during an office hour for Havok 4, and he mentioned something about the formula for llPushObject() possibly changing. I asked him to PLEASE give us detailed information about what formula was used so that we don't have to play a guessing game like we have in the past. He said he agreed that providing that information would be a good idea, but I haven't seen it yet.

This makes me wonder if the jump points in Suffugium will ever work in havok 4

It's significant to me that your methodology is "wearing an object that records the first time the horizontal velocity gets above 1m/s"... is it possible that the velocity change is not instantaneous for an avatar like it is for a prim? What I mean is, if you record several data points for each fall, does the velocity go any higher and settle on 10.0ish, or is it definitely sticking in these distinct bands?


Seifert Surface added a comment - 12/Jan/08 10:44 AM
I chose horizontal velocity because it should be constant in free fall, as there's no gravity in that direction.

I just did the test again, recording horizontal velocity on a while true loop in another attachment prim. I was expecting it to be constant whilst in freefall at the same horizontal velocity as the initial one just after the push.

It isn't, although it's not increasing to 10. It's decreasing over time. I get a bunch of readouts in a row of the same velocity value (presumably taken within the same physics frame, or at least between hits of whatever mechanism is damping things), then a bunch more at a lower value. The values go down each time by about 0.06, which handily explains the bands I saw before: we were getting some damping in before I see the first velocity. It doesn't quite explain why sometimes the initial velocity was a little bit higher than 10.0, but that must be a separate issue.

Anyway, the damping behaviour is trouble for anything needing to know the paths of avatars falling through the air. If we knew what the mechanism was and that it's deterministic, then we could work around it, but the behaviour really should be the same as for prims.


Lex Neva added a comment - 12/Jan/08 11:01 AM
Aha! That's an interesting piece of information. Now, to torture you a little more, if you repeat that last experiment in havok 1, the avatar doesn't lose horizontal speed, right?

Maybe we're dealing with some kind of friction-like force here. I know in havok1, at least, there are some pretty quirky behaviors of avatars, especially if they're flying. I think a friction-like damping is an integral part of how LL controls an avatar's movement.

I hope they'll remove this friction while falling, though. It'll make things like your transporters and Suffugium's jump points MUCH more difficult. The jump points were already pretty difficult because they calculate their velocity using a trajectory formula that involves solving a quadric polynomial. Add in this bizarre friction, and it'd be nearly hopeless.

For Lindens reading this and debating whether or not to keep this friction, visit Suffugium, fly up to the rooftops, and walk over an arrow sigil spraypainted onto the rooftop. You'll find your avatar (no matter your mass) precisely tossed to a matching sigil on an adjacent building. If llPushObject() doesn't behave in a consistent manner that we can understand and code for, then we don't have a hope of keeping cool content like this.


Seifert Surface added a comment - 12/Jan/08 11:17 AM
Just checked, and yes in Havok1, horizontal velocity is precisely constant while in freefall. Which it had to be, otherwise none of the things we built would have worked.

The damping isn't just llPushObject. It also messes up a different project that uses llApplyImpulse to an avatar.

If there is some sort of constant damping term then as long as it really is constant, you get a different differential equation to solve, which should still be possible, but I really don't want to have different code depending if the object is an avatar or a prim...


Seifert Surface added a comment - 17/Jan/08 09:11 PM
Here's a way to test the damping: It involves one attachment with two scripts in it.

////Script 1:
/////////////////this just spits out your velocity as frequently as possible
default
{
state_entry()
{
while(TRUE)

{ llSay(DEBUG_CHANNEL, (string)llGetVel()); }

}
}

////Script 2:
///////////////when touched, this gives you a push to cancel your current velocity, and set it to <10,0,0>
default
{
touch_start(integer total_number)

{ llApplyImpulse(llGetObjectMass(llGetOwner()) * (<10.0,0,0> - llGetVel()), FALSE); }

}

To test, wear the attachment, fly up to some height, stop flying to go into freefall, then click the prim to give the push to set your velocity to <10,0,0>. After a second or so, stop the readout script from running. Then you can scroll back up the debug chat and see how the velocity changes. In particular, the horizontal velocity is damped in Havok 4 for avatars (but not prims). In Havok 1, horizontal velocity is not damped, at least for low speeds.


RacerX Gullwing added a comment - 11/Jun/08 09:25 AM
The Giant Snail Races are hugely affected by this problem. I've added invisible boosters in the air to compensate for the inconsistency's, There like great invisible walls 60 meters tall and still they don't cover enough ground to match the range of inconsistency possible. See them at Montmartre 150 meters up on the north end of the sim

Without consistent avatar friction the announcers spend a lot of time pointing out things like Second Life is still in beta And when something works the way it was intended everyone is Greatly surprised because 9 times out of 10 it doesn't.

If you look at the archived races before Havok 4 on http://slcn.tv you can see the dramatic changes.
from consistency to anarchy in the latest races

We have an estimated 5,000 or more viewers watching the snail races every week.
You may want to fix this so we can start praising you again instead of you being the butt of a lot of the jokes.

How many votes do we need to get someone assigned to this? I'm sure I can get them.


Andrew Linden added a comment - 15/Jul/08 02:36 PM
A fix for this is pending.

Lex Neva added a comment - 15/Jul/08 04:24 PM
I can't wait

wayfinder wishbringer added a comment - 14/Aug/08 10:43 PM
I also look forward to a fix for this issue. I don't know if it's related, but we had to take down 2 long-standing games because of the same (or a similar issue):

CritterBall-- a game of tiny soccer with a huge soccer ball. The ball simply doesn't roll as it did under Havok 1. Very hard to push it, and once the push ends, the ball pretty much stops rolling. Hard to play soccer when the ball doesn't roll.

Ork Invasion-- a game of "shoot tinies across the sim to divebomb the orks"... the push stops anywhere from 50 to 120m. This is a shame, because it was one of our main tiny attractions.

Again, don't know if it's the same issue, a related issue, or a different issue, but push factors and "roll" factors just seem to not be working in Havok 4.


Howard Larkin added a comment - 29/Dec/08 04:52 AM
wow, it hasn't been fixed under a whole year.

RacerX Gullwing added a comment - 19/Feb/09 08:45 PM
What does fix pending mean? This fix has been pending for 6 months?

Andrew Linden added a comment - 19/Feb/09 09:00 PM
Good point. Whatever fix I thought I had must have been deployed months ago. I guess no one is verifying that this is actually fixed so we can reopen it. I take it the recipe above reproduces the problem.

Seifert Surface added a comment - 19/Feb/09 10:33 PM
I redid the test with my Jan 17th 08 code, and that does seem to be fixed now. I tried it with an object llPushObjecting me, and the horizontal velocity my avatar got was always exactly what I wanted. With some data collection, the path of a falling avatar now seems to be an extremely good fit to a parabolic arc, as expected.

However, there seem to be a couple of other things going on as far as I can tell:

1) The vertical velocity I get from llPushObject never seems to be quite enough to get me where I want to go. Of course the velocity starts decreasing immediately so it's hard to tell if it would be at the desired speed but only for a physics frame that a readout script never has time to report on, or if it isn't pushing as hard as it should. I think it still isn't pushing as hard as it should in the vertical direction, because I consistently fall under my target (as calculated assuming a parabolic trajectory). Hm, I haven't checked to see if the value of g has changed from 9.8m/s^2, that would cause this problem too.

2) There seem to be some "ground effects" that are stronger than in havok 1. In havok 1, once the avatar is lifted off of the ground, and assuming the user isn't pressing any keys, the avatar behaves like an object in freefall. Currently, a fraction of a second after being lifted off the ground by an initial llPushObject and then pushed by the main llPushObject the avatar often stops dead in mid air and falls to the ground. This never happens if I am flying, stop flying to go into freefall then hit the main llPushObject.

I think this second issue is probably the main one affecting RacerX's use.


Jack Abraham added a comment - 21/Mar/09 03:17 PM - edited
Seifert, does SVC-2513 match the behavior of your case (2)? My testing of that issue gives similar results, except that I seem to hit the wall even if flying.

Seifert Surface added a comment - 21/Mar/09 03:29 PM
Jack: yes, sounds like the same issue, and I agree it is something to do with the avatar being in the air or not. Things work much better when pushing an avatar that is already in freefall.