Monday, March 8, 2010

Evolution Simulation III Devastation in Science Sim!

Well not quite. But I was testing my critters to see how big a population my parcel in Science Sim could hold. Everything was fine until I went to delete them using a listen event with llDie triggered by a chatted command. Guess what, 600 prims dying all at once causes the asset server to have a fit: a bit disconcerting but Mic Bowman got things fixed....

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);




But in OpenSim the critters don't seem to turn toward the target in response to llLookAt as they do in SL.

1 comment:

Erik N. said...

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!