11-20-2005 19:50
I have a vehicle that rotates three or four times very quickly when you press a button, plays a sound, and fires a few particles. This works fine, but I want it to point back to the direction it was facing after rotation. Right now I say
CODE

spin()
{
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1.0);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 0.000001);
llApplyRotationalImpulse(<0,0,500 * TWO_PI>,TRUE);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.7);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 0.1);
}

The attraction efficiency is raised just before rotation so that the car does not tip at all. I've tried saving the llGetRot and set llSetRot to that, but it doesn't work.

Any ideas?