Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list destinazioni=[
- <64.691162,85.801987,22.183308>,
- <55.000000,98.500000,22.183308>,
- <67.500000,92.500000,22.183308>,
- <71.000000,85.500000,22.183308>,
- <64.691162,85.801987,22.183308>
- ];
- rotation getRotToPointAxisAt(vector axis, vector target) {
- vector mypos=llGetPos();
- target=<target.x,target.y,mypos.z>;
- return llGetRot() * llRotBetween(axis * llGetRot(), target - llGetPos());
- }
- default
- {
- state_entry()
- {
- llSitTarget(<0,0,0.5>,llEuler2Rot(<0,0,PI/2>));
- }
- touch_start(integer count)
- {
- integer i; rotation r1=llGetRot();
- for(i=0;i<llGetListLength(destinazioni);i++)
- {
- vector destinazione=llList2Vector(destinazioni,i);
- rotation r=getRotToPointAxisAt(<0,1,0>,destinazione);
- llRotLookAt(r,1.0,10.0);
- // llSetRot(r);
- while(llVecDist(destinazione,llGetPos())>.1)
- {
- llSetPos(destinazione);
- llSleep(0.1);
- }
- }
- llSetRot(r1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement