|
David Bournemouth
Registered User
Join date: 8 Oct 2006
Posts: 13
|
10-07-2007 11:30
I'm hoping that some poor kind soul will tell me where I'm going wrong (other than the obvious "don't even try it, Kid, it's too complex for your two brain cells"  . OK, here's my setup. I've rezzed a 10x10x3 cylinder, and then hollowed it out to 95%. Then I cut it to .80, in such a way that you have a nice opening which permits to walk inside and out. I've tried, there's plenty of space when static. Then I've shoved a "generic rotation" script in there - full text of which follows. default { state_entry() { llTargetOmega(<0,0,.15>,PI,1.0); } } And the cylinder spins away happily on the Z axis - just like expected. Problem is - the opening "door" comes around and I can't seem to enter through the gap. I've cut the opening back to .50, just to experiment, and still I stand, pressed up against the nothingness, but unable to enter the centre. Unfortunately, making the cylinder "phantom" won't work for what I'm trying to do either, so that's not an option. So, like I said, is there some kind soul who can tell me where it's all going wrong, and if it's a question that I've just used the wrong script for the wrong job - could someone point me in the right direction. Pleeeeeeease - before I pull out the rest of my hair. Thanks
|
|
Stephen Zenith
Registered User
Join date: 15 May 2006
Posts: 1,029
|
10-07-2007 11:51
From: David Bournemouth I'm hoping that some poor kind soul will tell me where I'm going wrong (other than the obvious "don't even try it, Kid, it's too complex for your two brain cells"  . OK, here's my setup. I've rezzed a 10x10x3 cylinder, and then hollowed it out to 95%. Then I cut it to .80, in such a way that you have a nice opening which permits to walk inside and out. I've tried, there's plenty of space when static. Then I've shoved a "generic rotation" script in there - full text of which follows. default { state_entry() { llTargetOmega(<0,0,.15>,PI,1.0); } } And the cylinder spins away happily on the Z axis - just like expected. Problem is - the opening "door" comes around and I can't seem to enter through the gap. I've cut the opening back to .50, just to experiment, and still I stand, pressed up against the nothingness, but unable to enter the centre. Unfortunately, making the cylinder "phantom" won't work for what I'm trying to do either, so that's not an option. So, like I said, is there some kind soul who can tell me where it's all going wrong, and if it's a question that I've just used the wrong script for the wrong job - could someone point me in the right direction. Pleeeeeeease - before I pull out the rest of my hair. Thanks The problem is that llTargetOmega is what's called client-side - it tells the sim to tell the clients that it's spinning, but the sim doesn't spin it itself. Normally it's not a problem, unless you need to do something with the physics - which is handled on the sim - such as walking through a gap that appears. You'll probably find you can walk through where the hole was before you told it to spin.
|
|
David Bournemouth
Registered User
Join date: 8 Oct 2006
Posts: 13
|
10-07-2007 12:46
From: Stephen Zenith
You'll probably find you can walk through where the hole was before you told it to spin.
Sure can - good spot. And thanks for the informative reply Stephen. HOWEVER ... (isn't there always a however?) should I just give up on this idea, or is there a different LSL function, which is not client side, which will spin an object and allow me to proceed? Thanks again
|
|
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
|
10-07-2007 14:04
I believe if you make the object physical, it will actually be rotated server-side, though this may be laggy. Other than that, I think your only option is repeated calls to llSetRot(), which may be just as laggy, if not more.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-07-2007 14:09
From: David Bournemouth Sure can - good spot. And thanks for the informative reply Stephen.
HOWEVER ... (isn't there always a however?) should I just give up on this idea, or is there a different LSL function, which is not client side, which will spin an object and allow me to proceed?
Thanks again For non physical objects, the answer would be no, there is nothing that will work like llTargetOmega. LLSetRot will only move it one time and there is a .2 second script delay. So even if you called it multiple times in a loop, it would be jerky. You could thou make it physical and use llApplyRotationalImpulse. It will take a bit more scripting and futzing around but should give you what you want.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
|
10-07-2007 20:33
You can also do non-physical more or less smooth motion (or rotation) by using multiple scripts running in parallel so you don't have to wait for the .2 sec. If you have 10 scripts and synchronize them you can do .02 sec steps which is pretty smooth.
Search for non-physical motion.
|