Jump to content

Royal Stewart

Resident
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Royal Stewart

  1. I've had this happen a couple of times in the past, and it turned out to be the avatar bounding box. Raise the sit position one meter and see if it levels out. If so find a driving animation thats closer to the ground when played from inventory
  2. Thank you for your reply. I'll drop in some Debug says, and see what comes up. And as far as the llTargetomega stops. When using llTargetOmega to drive wheels You have to stop the rotation first, then turn the prim and then restart the rotation. Otherwise the wheel will wobble. And yes the timer is way to fast for this application. It was set to 1.0, and I wondered if the rate change was to slow to show up. So I cranked it up to see, and forget to back it off before I posted here. Just being a really basic scripter I was beginning to think there was just some format issue the editor wasn't picking up. That has bit me in the butt more than once in the past. Thanks for your time
  3. I'm trying to create a universal vehicle front wheel script. Everything works except getting the float Rate to work inside of separate states? If I enter a numerical Rate setting the wheel spins, stops, turns, and then restarts as needed. Unfortunately all this takes place at a constant speed which will not really work for what I'm attempting. The Settext tells me I get Rate change with movement. the (float) Rate, is just not being picked up by the states (left,right and center)? vector r_left = <0.00000, 0.00000, 99.99999>; // Rotations in degrees relative to root prim vector r_center =<-0.00000, -0.00247, 90.00001>; vector r_right = <0.00000, 0.00000, 80.00001>; float Speed; float Rate; float NewRate; rotation LocalRot(rotation localrot) { rotation LocRot = localrot / ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot()); return LocRot; } left() { llTargetOmega(<0,0,0>, 0.0, 0.0); llSetPrimitiveParams([PRIM_ROTATION, LocalRot(llEuler2Rot(r_left* DEG_TO_RAD))]); llTargetOmega(<1,0,0> * llGetLocalRot(),(Rate), 1.0); } center() { llTargetOmega(<0,0,0>, 0.0, 0.0); llSetPrimitiveParams([PRIM_ROTATION, LocalRot(llEuler2Rot(r_center * DEG_TO_RAD))]); llTargetOmega(<1,0,0> * llGetLocalRot(),(Rate), 1.0); } right() { llTargetOmega(<0,0,0>, 0.0, 0.0); llSetPrimitiveParams([PRIM_ROTATION, LocalRot(llEuler2Rot(r_right * DEG_TO_RAD))]); llTargetOmega(<1,0,0> * llGetLocalRot(),(Rate), 1.0); } default { state_entry() { llSetTimerEvent(0.1); center(); } link_message(integer send, integer num, string msg, key id) { if ( msg == "center" ) { center(); } else if ( msg == "left" ) { left(); } else if ( msg == "right" ) { right(); } else if ( msg == "forward" ) { llTargetOmega(<1,0,0> * llGetLocalRot(),Rate, 1.0); } else if ( msg == "stop" ) { llTargetOmega(<0,0,0>, 0.0, 0.0); } } timer() { Speed = llVecMag(llGetVel()); if(Speed < 0.3) { NewRate = 0.0; } else if((Speed >= 0.4) && (Speed < 6.0)) { NewRate = 3.0; } else if((Speed >= 6.0) && (Speed < 12.0)) NewRate = 9.0; else if((Speed >= 12.0) && (Speed < 18.0)) NewRate = 15.0; else if((Speed >= 18.0) && (Speed < 24.0)) NewRate = 21.0; else NewRate = 27.0; if(Rate != NewRate) { Rate = NewRate; llSetText((string)NewRate, <1, 1, 1>, 1.0); // llWhisper(0, "working"); } } }
  4. Thanks for the ideas Drongle, the keep centered button seems to be working now so I burned a little of the bounding box. The prop is finally spining on center.
  5. Hi folks, on my third try at making a 3 bladed boat prop. I'm using Jass Pub. the sculpt shows as centered within the bounding box before baking. Once imported into sl, the blades seem to be forcing the sculpt to one side of the bounding box, resulting in an offcenter wobble when rotated. Is there a way to force the sculpt to stay centered, even if it means a bigger Bounding box ? headed to bed, I'll check back tomorrow. Thanks in advance, for suggestions or help. Royal
×
×
  • Create New...