Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Smooth non-constant rotation.

BrownEyedSusan Beaumont
Registered User
Join date: 19 Jul 2007
Posts: 9
08-02-2007 09:01
OK, correct me if I'm wrong, but the way to do smooth constant rotation is to use llTargetOmega and have your object non-physical. This is dead smooth because it's all done client side - this is the way to do it - end of story.

The thing is, I don't want constant rotation - I want to emulate harmonic motion which means the omega is constantly changing. What's more - it's not changing by a constant amount.

I've tried calling llTargetOmega on my non-physical object in a timer call-back which sets the new value according to what's calculated (in fact in my experiment it simply increases omega so the object should gradually speed up). I was hoping the client would update the angular speed on receiving updates from the server and still look smooth. Unfortunately, it is no longer smooth.

I believe there is no such thing as a client-side script. Except an animation, which is a sequence of poses and only applies to avatars?

Can anyone make any suggestions, please? Is there anything I've missed or mis-understood?

TIA,

Susan.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-02-2007 10:20
I think you pretty much have it down. Unfortunately, there just is no good way to do that kind of animation. Either you do it with llTargetOmega, which is buggy and not suited for varying Omega, llSetRot in a loop, or make it physical and use llSetTorque().

No matter how you do it, it won't be perfect, and it may end up looking like crap. Just one more limitation to LSL and SL in general.
BrownEyedSusan Beaumont
Registered User
Join date: 19 Jul 2007
Posts: 9
08-02-2007 11:20
From: Talarus Luan
I think you pretty much have it down. Unfortunately, there just is no good way to do that kind of animation. Either you do it with llTargetOmega, which is buggy and not suited for varying Omega, llSetRot in a loop, or make it physical and use llSetTorque().

No matter how you do it, it won't be perfect, and it may end up looking like crap. Just one more limitation to LSL and SL in general.


OK. Well, I only chose an emulation of harmonic motion because I knew absolutely nothing and I thought it would be a good example of something pretty for me to work towards while I learn the basics. I'm now thinking with hindsight that it's not a great thing to start with. So I'm going to think of something else to do but I'll watch this thread and watch for developments (such as client-side scripts, or improvements to llTargetOmega).

Thank you,

Susan