06-30-2007 07:03
Hi Guys ,
Tring to create a giant rolling pin type thing, basically it will rezz a cylindrical object and and it will roll across the ground and push other phyiscal obects , but I am encountering 2 issues;
1. right now it only rolls in one direction, probably the llRotLookAt settings. Would like to have it roll in the dirction the rezzer is pointing. and continue in the direction.

2.Have tried setting both impluse and force, but when the cylinder makes contact with another physical object it gets deflected, if I apply more force or impluse, the object either moves too fast or get deflected at twice the velocity.

Posting the code so you all can see the errors of my ways! ;)



any help would be appreciated!

[Code
default
{
state_entry()
{
llSay(0, "Hello, Avatar!";);
//llSetBuoyancy(1.0);
llSetHoverHeight(0.5,TRUE,10); //set just above ground level
llSetTimerEvent(30); //time till death
llSetStatus(STATUS_PHYSICS,FALSE); // used for testing
llSetStatus(STATUS_PHANTOM,TRUE); //used for testing
llSetRot(llEuler2Rot(<0.0,270.0,32.0>*DEG_TO_RAD)); //set rotation
llRotLookAt(llEuler2Rot(<0.0,270.0,32.0>*DEG_TO_RAD), 1, 1); // maintain direction
llCollisionSound("", 0); // kill collision sound

}

touch_start(integer total_number) // Touch used to test, will eventually be spawned from a rezzer
{
llSay(0, "Touched.";); // Touch used to test, will eventually be spawned from a rezzer
llSetStatus(STATUS_PHYSICS,TRUE); //set to physical
llSetStatus(STATUS_PHANTOM,FALSE); // make it solid
llApplyImpulse(llGetMass()*<0,0.7,0>,FALSE); //get it rolling
llSetForce(llGetMass()*<0,0.3,0>, TRUE); // add force
}
collision_start(integer num_detected)
{
llResetScript(); //set for testing

}
land_collision_start(vector pos) //die command for higher elevation contact
{
llResetScript(); //set for testing
// llDie
}



timer()
{
//llDie();
}
}
]/Code