Jump to content

JointVenture1488303251

Resident
  • Posts

    4
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, that is strange. Please test this in any order: rezz a Prim, put in the script, rezise the prim to 0.01 ,0.01, 0.01 change parameter to Sit on Object float angle = 0.2; // (radians)float steps = 38.0; // > = langsamer (keyframes)vector Position = <-0.27, 0.00, 0.13>; // Avatar Positionvector Rotation = <0, 0, 90>; // Avatar Rotation// << END edit// ------------------------------------float step = 0.0;list KFMlist = [];vector U;vector V;float angleU = 0.0;float angleV;integer swing = 1;vector basePos;rotation baseRot; integer LinkTarget = LINK_THIS;string Animation = "";key Avatar = "";integer Permission = FALSE;default{ state_entry() { llSetMemoryLimit( llGetUsedMemory()+0x1000); if(llGetInventoryNumber(INVENTORY_ANIMATION) > 0 && Animation == "") // Prueft ob eine Animation vorhanden ist. { Animation = llGetInventoryName(INVENTORY_ANIMATION, 0); // Speichert den Namen der eingelegten Animation. } //// Pendulum motion by Dora Gustafson, Studio Dora 2012 llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]); basePos = llGetPos(); baseRot = llGetRot(); vector v1 = llGetScale(); float periode = TWO_PI*llSqrt( v1.z/9.81); float dT = periode/steps; dT = llRound(45.0*dT)/45.0; if ( dT < 0.11111111 ) dT = 0.11111111; v1.x = -0.25; v1.y = 0.0; v1 = 0.45*v1*llGetRot(); U = v1; while ( step < steps ) { step += 1.0; angleV = angle*llCos( TWO_PI*step/steps + PI_BY_TWO); V = v1*llAxisAngle2Rot(llRot2Left(llGetRot()), angleV); KFMlist += [V-U, llEuler2Rot(< 0.0, angleV-angleU, 0.0>), dT]; angleU = angleV; U = V; } } run_time_permissions(integer Permission) { if(Permission & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation("sit_generic"); llStopAnimation("sit"); llStartAnimation(Animation); } } changed(integer change) { if (change & CHANGED_LINK) { if ( swing == 1 ) { //llVolumeDetect(TRUE); Avatar = llGetLinkKey(2); //llAvatarOnLinkSitTarget(LinkTarget); if (Avatar) { llSetKeyframedMotion( KFMlist, [ KFM_MODE, KFM_LOOP]); if(Animation != "") // Wird nur ausgefuehrt, wenn bekannt. { llRequestPermissions(Avatar, PERMISSION_TRIGGER_ANIMATION); } swing = 0; } } else if ( swing == 0 ) { if(Permission) // Wenn die Permission abgefragt wurde. { if(llKey2Name(Avatar) != "") // Prueft Avatar noch da ist. { llStopAnimation(Animation); } Permission = FALSE; // Loescht Perms. } Avatar = ""; swing = 1; llSetKeyframedMotion( [], []); llSetPrimitiveParams([PRIM_POSITION, basePos, PRIM_ROTATION, baseRot]); //llVolumeDetect(FALSE); } } if(change & (CHANGED_OWNER|CHANGED_REGION_START|CHANGED_INVENTORY)) { llResetScript(); } } on_rez( integer n) { llResetScript(); }} I've noticed, It is not a behavior of the mesh itself. cheers
  2. i do not exactly know what the KeyFrameMotion do with my mesh. I tried your example with the same mesh, got no pushing. And a test with my (pushing-script) in side a Prim the same, all looks nice. i am konfused. cu later
  3. Hi, that is strange, please can someone confirm that behavior for KeyframedMotion with sit script? watch: http://gyazo.com/a90aa5c3666c7478ef41c0677cb184f2 The Chair push me 2-20 meters high. I've attempted llVolumeDetect and PRIM_PHYSICS_SHAPE_PRIM. Nothing help here.
×
×
  • Create New...