|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
11-13-2007 23:00
rezzing some products with the script line:
llRezObject(product, rezpos, ZERO_VECTOR, ZERO_ROTATION, TRUE);
three shoes: red, blue and green let's say.
first time through, shoe blue rezzes a bit below where the other ones have rezzed. It didn't quite make it up to rezpos.
Second time through, it will rez up to the correct height as the others did.
Another day, it will rez below again. Or, it will be shoe green's turn to rez a bit below where rezpos actually is.
Any thoughts? Can it be because of a bad sim? In a good sim, I'm unable to reproduce this.
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-14-2007 00:37
stupid question, but how are you calculating 'repos'? it could be that there are rounding errors creeping in...
dunno how the sim code works, but it's possible that if busy they may use a faster/less accurate method of reporting positions. never noticed it myself so I couldn't say.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Chaz Longstaff
Registered User
Join date: 11 Oct 2006
Posts: 685
|
11-14-2007 00:53
reasonable question.
float Height;
(Height something like .250000, .500000, 1.000000)
curpos = llGetPos(); rezpos = <curpos.x, curpos.y, curpos.z + Height>; llRezObject(product, rezpos, ZERO_VECTOR, ZERO_ROTATION, TRUE);
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-14-2007 01:20
From: Chaz Longstaff reasonable question. float Height; (Height something like .250000, .500000, 1.000000) curpos = llGetPos(); rezpos = <curpos.x, curpos.y, curpos.z + Height>; llRezObject(product, rezpos, ZERO_VECTOR, ZERO_ROTATION, TRUE); hmm just a wild guess, but maybe it's recalculating the elements when you do that... that's all I can imagine you could try this to make it a little faster and eliminate possible recalculation of all but z currpos = llGetPos(); rezpos = currpos; rezpos.z += Height; but since z seems to be the issue, I don't know... never seen that, and it sounds like a region issue more than anything.. maybe up z a little and have it hover so it's not as noticeable? I'm guessing from the shoe example it's some sort of display/vendor application I'm also assuming nothing has physics here, since they could be being moved by a poorly calculated bounding box (and they're all poorly calculated in havok 1) I doubt the rotation would be affecting it, although I do usually use this for rezzors llRezObject( "Object", (llGetPos() + offset) * llGetLocalRot(), ZERO_VECTOR, llGetLocalRot(), 42 ); to get an offset relative to my object... in the case of vendors, this means they can be placed at any angle, including on the ceiling =)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
11-14-2007 01:50
Use llRezAtRoot, not llRezObject.
|