Runaway Physics
|
|
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
|
02-15-2006 07:12
Hi all,
My attempts to remedy this (or for that matter, logically explain it) has been so far unsuccessful and those whom I talked to who had similar projects had the same similar issue, so perhaps someone has found a successful workaround to this:
I have a phantom physical object that moves randomly around a virtual bounding box (basically chooses coordinates between the upper and lower corners). It moves via llMoveToTarget(). The issue is, periodically (ever 3-4 days), the object decides it is sick of it's little playpen and decides to fly off into the wild blue yonder, ending up way way outside of the set bounding box.
Anyone have any wagers on what is going on?
|
|
Intent Unknown
Registered User
Join date: 16 Nov 2005
Posts: 82
|
02-15-2006 07:22
When my physical prims start flying off the grid I turn on Highlight Transparent and look around for a nearby avatar wearing a large transparent sphere attachment. Looking in the contents of the attachment will invariably turn up a script from the Hand of God series of products which for some unknown reason scans the surroundings for active objects and applies a large amount of push to them. I generally IM the person and ask them nicely to please turn off their Hand of God. I have never had anybody refuse as of yet.
|
|
Masakazu Kojima
ケロ
Join date: 23 Apr 2004
Posts: 232
|
02-15-2006 07:38
I don't know if your problem is similar, but I have a fan club that likes to destroy everything I make, and it only takes one llPushObject to give my merry-go-round a new home 16 sims away, llMoveToTarget be damned. Using STATUS_SANDBOX let me avoid having to deal with people getting knocked into oblivion by rampaging swings and night clubs that didn't feel my playground was an appropriate addition to their establishment, but I've still had a few things go off world on the opposite side of the grid before noticing they may just very well have exceeded their 10m restriction.
|
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
02-15-2006 07:41
Hi Alondria,
To reinforce what Intent said, I was working on a physical/not phantom stegosaurus many months ago and finally chalked this happening up to pushguns/HoG. Also, physics still can be really clunky, if something bumps the right place at the right time, even the smallest, weakest of collisions can send something flying a sim or two away.
As far as workarounds, if you're moving within a static area, simply add into your movement loop, "If I'm outside of my area, move back there"... Then again I haven't done much with phantom/physical combined and may be misunderstanding the issue.
|
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
02-15-2006 07:44
From: Logan Bauer simply add into your movement loop, "If I'm outside of my area, move back there". ... and if I'm not even in the same sim anymore, send an email back to my base asking it to rez a new copy of me, and then I'll quietly llDie.
|
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
02-15-2006 07:47
...Unless it lands in a no-script zone, then it sits there and goes "thud" quietly. 
_____________________
~ Tiger Crossing ~ (Nonsanity)
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
02-15-2006 08:32
From: Ben Bacon ... and if I'm not even in the same sim anymore, send an email back to my base asking it to rez a new copy of me, and then I'll quietly llDie. I've managed to get my guest boats to move home across sim boundaries, so that shouldn't be an insurmountable problem.
|
|
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
|
02-15-2006 09:32
When testing my Daleks along with weaponry, I had two simply disappear. One moment they were there, wandering around and shouting like Daleks are want to do, then the next...not. Also, the time dilation of the sim dropped to 0.01 and for a moment I thought there was some nasty physics bug with the Dalek.
Come to find out, one of my neighbors must have grown weary of my wandering Daleks and were tossing them around with a gravity gun!
So yeah, I would suspect that either someone is intentionally or perhaps unintentionally pushing the active object.
|
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
02-15-2006 14:07
From: Logan Bauer As far as workarounds, if you're moving within a static area, simply add into your movement loop, "If I'm outside of my area, move back there"... Then again I haven't done much with phantom/physical combined and may be misunderstanding the issue.
The functions on GlobalCoordinate should help here. All you need to do is store a start position (as a global coordinate, to avoid problems with sim borders) before you turn the object physical. If you want to avoid using timers to check if the object is out of range, pass llTarget a position and range, and declare a not_at_target event that turns the object non-physical and setGlobalPos'es it back to the starting point. I have an example of something like this on the llSetStatus page. That should cover your bases unless the push somehow teleports it to a place where the object cant return to its starting position.
|
|
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
|
02-15-2006 19:15
Well, in my hermitted state, I never realized that llPushObject() has become so rampidly abused. I have no problem creating a defense against it, I was just assuming it was some sort of buggy thing or whatnot. It is rather pathetic that I'll have to waste sim cpu clocks on this, but I suppose thus is life. Thanks to everyone for drawing my attention to how severe this problem has become.
|
|
Kalleb Underthorn
Registered User
Join date: 30 Jul 2003
Posts: 40
|
02-16-2006 09:14
Another tip for keeping your objects inside the bounding region... I'm assuming the ball is using llSensor to find the bounding box (hollowed or otherwise) if you want. you can do this: state_entry() { // I never seem to be able to remeber the arguements llSensorRepeat( "Bounding Box", NULL_KEY, PASSIVE, boundingSize*4, PI, 4 ); }
no_sensor() { llDie(); }
sensor( integer count ) { llMoveToTarget( llDetectedPos(0) + <llFrand(10)-5.0,llFrand(10)-5.0,llFrand(10)-5.0> ); }
This way, if the ball gets too far away, it will just parish. You could also make the bounding box check to see if the little bouncing ball is nearby, and if not, auto-spawn it.
|
|
Aislin Wallaby
Registered User
Join date: 4 Mar 2005
Posts: 27
|
same problem with elevators
02-17-2006 11:59
I ran into the same problem with elevators as well. The easiest way to fix it that I've found is to have the elevator be non-physical when it's not in motion (you should be doing this anyways to cut down on the strain on the physics server), and use the not_at_target() call with a check using llGetPos() so that if it gets too far off of the track it sends a polite message, turns off physics, and uses llSetPos() to reset itself, this however potentially leaves the griefer trapped in an elevator shaft so for the sake of compliance with the spirit of the TOS, make sure there's a way to get out of the shaft if someone accidentially gets stuck.
As far as the Dalek's, if they're moving using a llMoveToTarget() call, you can do the same thing, just base your test on their current altitude or a box set by the coordinates.
the code would look something like this:
vector desiredpos = <0,0,0> //The position you want it to go to vector maxpos = <0,0,0> //The maximum for each of the coordinates that it can reach before it resets itself
not_at_target() { vector currentposition = llGetPos(); if(currentposition.x>maxpos.x || currentposition.y>maxpos.y | currentposition.z >= maxpos.z) { llSetStatus(STATUS_PHYSICS, FALSE); while (currentposition!=desiredpos) //using a loop in case we get more than 10 meters away { currentposition=llGetPos(); llSetPos(desiredpos); } } }
|
|
Caroline Apollo
Lo Lo
Join date: 23 Oct 2003
Posts: 288
|
02-23-2006 10:30
I have butterflies made by Garth Fairlight that always end up wandering off world. It is set up where I tell it where to start and end, but after a few days they take off.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
02-24-2006 08:09
From: Aislin Wallaby I ran into the same problem with elevators as well. The easiest way to fix it that I've found is to have the elevator be non-physical when it's not in motion I do this and sometimes I end up with an object that's non-physical but imparts motion to an avatar standing on it, so when I get into my elevator I'm running in place. Or it'll stop in-game but appear to keep on moving in my client. My boats and innertubes get the same problem, too, and appear to sink into the ground or I'll find them slowly spinning in place like they had an lltargetOmega on them. Other people see this as well until I shift-drag-clone-delete them.
|