Tealthantos Posted May 9, 2013 Posted May 9, 2013 This is a script that I've come across for a tank tread, thing is that the animation should be sliding on the X axis but is clearly sliding on the Y float speed;default{ state_entry() { } link_message(integer sender_num, integer num, string str, key id) { if(str == "WHEEL_DRIVING") { state driving; } } }state driving{ state_entry() { llSetTimerEvent(0.5); } timer() { vector vel = llGetVel(); speed = llVecMag(vel); if(speed < 0.5) { llStopSound(); llSetTextureAnim(1, 0, 0, 0, 0, 0, 0); } else { llLoopSound("fe04e8a4-28a2-1870-7889-27b2d964c669",1.0); } } link_message(integer sender_num, integer num, string str, key id) { if(str == "WHEEL_DEFAULT") { state default; } if(str == "WHEEL_FORWARD") { llSetTextureAnim(ANIM_ON|LOOP|SMOOTH,ALL_SIDES,1,0,0,0,speed / 2); } if(str == "WHEEL_REVERSE") { llSetTextureAnim(ANIM_ON|LOOP|SMOOTH|REVERSE,ALL_SIDES,1,0,0,0,speed / 2); } if(str == "WHEEL_RIGHT") { llSetTextureAnim(1, 0, 0, 0, 0, 0, 0); } if(str == "WHEEL_LEFT") { llSetTextureAnim(ANIM_ON|LOOP|SMOOTH,ALL_SIDES,1,0,0,0,speed / 2); } } state_exit() { llSetTextureAnim(0,ALL_SIDES,1,0,0,0,0); llStopSound(); } }Any help would be appreciated.
Jenni Darkwatch Posted May 9, 2013 Posted May 9, 2013 Just rotate the texture until it works as intended... it's IMO the easy fix.
Tealthantos Posted May 9, 2013 Author Posted May 9, 2013 Jenni Darkwatch wrote: Just rotate the texture until it works as intended... it's IMO the easy fix. Not quite as its a unwraped mesh item, looks like im going to have to change the map again
Rolig Loon Posted May 9, 2013 Posted May 9, 2013 Unfortunately, that's the way llSetTextureAnim works. Your only choice is to rotate the original image. You shouldn't have to change the UV map, though. All you need to do, as Jenni says, is apply the texture to the map at 90 degrees to where it is now.
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now