And immediately after Mic's fix:
Thigs were still loading at this point. What Mic recommended is that I use a random number to determine when a particular critter is going to die so that when I issue the command to die the critters don't all die at once.
In SL this bit of code gives a quite realistic movement for my critters:
vector newpos = newcoodinates(llGetPos() ,3.0);
llSetRot(llEuler2Rot(<0,0,-pi/2>)*llGetRot());
llLookAt(newpos,1,0);
llSetPos(newpos);
But in OpenSim the critters don't seem to turn toward the target in response to llLookAt as they do in SL.
1 comment:
I don't know if you still need this, but I had this problem with lack of llLookAt implementation in OpenSim when I was trying to port Troy McLuhan's molecule rezzer from SL to my OS sandbox. llLookAt is used to get the bonds to rotate to their position between the atoms. Fortunately, Michelle Argus on the OSGrid forum supplied me with this workaround and it works beautifully:
rotation rot6X = llGetRot() * llRotBetween(<0.0 ,0.0 ,1.0 > * llGetRot(), a - llGetPos());
llSetRot( rot6X);
So you would replace the vector 'a' with your vector 'newpos'. It's worth a try!
Post a Comment