Often during the course of it's travels, it ends up "fallen over", laying on it's side, or just a little crooked. What I'd like is someway to either keep the object upright at all times (no rotation around x or y I believe), or at least a function that I can call peroidically to tell it to stand back up -- but to also stay facing in the direction it was headed...
Right now I'm using this script when the object reaches it's destination:
rotation MyRot = llGetRot();
vector v = llRot2Euler(MyRot);
rotation rot = llRotBetween(<0.0, 0.0, 0.0>, <v.x, v.y, 0>
; llRotLookAt(rot, 0.5, 0.5);
This accomplishes the goal of making the object upright, but it always ends up facing the same "zero" direction instead of keeping it's rotation around the z-axis.
I'll gladly pay L$500 to whoever can correct the above code, and another L$500 if someone has a good solution to force the object to maintain an upright position at all times (while still being able to spin around, and not using a "stand" prim).
Thanks!
and if you want to check out my objects for yourself - they're in Terminus, and they're called Plobs.