Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llTargetOmega hiccups

Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
03-29-2006 10:27
Ok then,

I've been using physical llTargetOmega() and I'm seeing fairly regular pauses in the motion. The pause frequency seems to vary with the angular velocity involved, but not strictly so. When I allow the spin to simply run continuously the pause frequency seems to be around once every ten seconds. I also did an oscillating motion (flipping the direction on a timer which fires every second) which paused around every fifteen seconds. For the oscillating motion case, a quit edit/deselect will get the motion restarted.

WHat's going on here?

- C
Teddy Wishbringer
Snuggly Bear Cub
Join date: 28 Nov 2004
Posts: 208
03-29-2006 10:35
If I'm not mistaken, TargetOmega is done client side.. so if there's pauses, I would think it's something on your computer spiking in activity causing the hickups..

I'm sure if I'm wrong, someone will correct me though. :)
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
03-29-2006 10:43
Your not mistaken, its Rendered Client side. Thus other people might not be seeing the same hiccups you are.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-29-2006 10:45
Sometime recently, like version 1.7 or 1.8, llTargetOmega() got a little more server-side than it had been. I think motion might be synchronized across clients, and sitting on a targetomega object and typing doesn't reset the motion. Standing on a big targetomega block spins your avatar around, so somehow these things are in the physics engine too.

With that change came occasional hiccups. I've seen them too, as have all of my friends.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
03-29-2006 10:47
I believe llTargetOmega on a physical object is handled server-side.

To the OP... I don't know the answer to your question. I have seen strange behavior with physical objects and the edit-select-deselect. I was trying to make an object explode by unlinking all the prims. They would unlink, but only a handful woulf drop to the ground, the rest would stay frozen in place. Selecting/deselecting them would somehow make the sim 'remember' that these are physical objects, and they'd fall to the ground as expected. I didn't dig into it too much to try and characterize the behavior further.
Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
03-29-2006 11:05
physical llTargetOmega *is* server-side.

other AVs have verified the hiccups for me.

I have this general suspicion it is a Linden bug. I just don't want to write my own ramping routines via llApplyRotationalImpulse(). If someone can verify this is a non-bug, please tell me what I am doing wrong.

- C
Francis Chung
This sentence no verb.
Join date: 22 Sep 2003
Posts: 918
03-29-2006 16:35
Non-physical llTargetOmega is client-side, but it resets sometimes if a new update associated with an object happens.

It used to be that if you sat on an object being rotated with llTargetOmega, it would reset the rotation every time your avatar started typing. (I think this has been changed)

You might look for other things in your script that might cause an update, such as changing colour/texture/settext. I haven't verified myself, but I've been told that even a script changing states (and not causing any other side effects) can trigger such an update. This was used as a work-around for another object that wasn't properly updating the client.
_____________________
--
~If you lived here, you would be home by now~
Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
03-30-2006 03:02
OK Here's the code. As you can see it *definitely* runs in a physical object. The object motion hiccups whether it is started with the "kick" command or with the "tick" commmand. Sometimes it takes an edit/deselect cycle to get it unstuck, sometimes it restarts on its own...

CODE

// -*- c++ -*-

float tick_dir = 1.0;
float tick_time = 0.2;
float tick_tock = 0.5;
float tick_fric = -0.5;
vector lock = ZERO_VECTOR;

default
{
state_entry() {
lock = llGetPos();
llSetBuoyancy(1);
llSetStatus(STATUS_PHYSICS|STATUS_ROTATE_Z, TRUE);
llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y, FALSE);
llListen(13, "", NULL_KEY, ""); }

listen(integer c, string n, key k, string m) {
list cmd = llParseString2List(m, [" "], []);
string word = llList2String(cmd, 0);

if(word == "status") {
llSay(0, "tick_tock = " + (string)tick_tock);
llSay(0, "tick_time = " + (string)tick_time);
llSay(0, "tick_fric = " + (string)tick_fric);
}

if(word == "stop") {
llSetTimerEvent(0);
llSetTorque(ZERO_VECTOR, TRUE);
llTargetOmega(<0,0,1>, 0, 0); }

if(word == "kick") {
float kick = (float)llList2String(cmd, 1);
llSay(0, "kicking " + (string)kick);
llTargetOmega(<0, 0, 1>, kick, 0.01);
}

if(word == "tick") {
integer l = llGetListLength(cmd);
if(l > 1)
tick_tock = (float)llList2String(cmd, 1);
if(l > 2)
tick_time = (float)llList2String(cmd, 2);
if(l > 3)
tick_fric = (float)llList2String(cmd, 3);

lock = llGetPos();
llSetTimerEvent(tick_time); }}

timer() {
vector scale = llGetScale();
vector omega = llGetOmega();
llSetPos(lock);
llSay(0, "omega = " + (string)omega);
llTargetOmega(<0, 0, 1>, tick_tock * tick_dir, tick_fric);
tick_dir *= -1.0; }
}
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-30-2006 11:04
From: Ziggy Puff
I believe llTargetOmega on a physical object is handled server-side.


I'm talking about llTargetOmega used on a non-physical object, though. Trust me. Try it.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
03-30-2006 11:26
From: Lex Neva
I'm talking about llTargetOmega used on a non-physical object, though. Trust me. Try it.


I'll take your word for it :) My post was in response to the posts which said that llTargetOmega is client side. Caoimhe specifically asked about llTargetOmega on physical objects, which are handled by the server.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-31-2006 10:03
Oh... I didn't see the OP mention that this was on a physical object until later in the thread, so I thought you were talking to me.