From: Shadow Subagja
I don't think you need it physical to use llMoveToTarget (as in the physical checkbox in the prim settings). llSetRot should work. AFAIK, you only need the physical setting if you want to use physics (ie drop it with gravity, or push it with other objects etc).
Well I am getting sort of the effect I want. I had to set physics off before doing the turn as you can not do a llMoveToTarget as a non physical. But here is my issue now, it turns way fast. This is supposed to be a ridding horse drawn carrage and going to snap necks, any way to slow the rate down?
Also on the same lines when I do the LLMoveToTarget it starts really fast then slows down as it reaches the target. It would be nice to have a constat speed through the whole movement. I will post the sript as I ahve it now.
Please remember I am new at SL script so my code is probably really messy.
integer Vector_Target;
key kQuery;
integer iLine = 0;
string Location;
integer Wait;
integer Rotation;
Move(vector Location)
{
//llOwnerSay((string) iLine);
Vector_Target = llTarget(Location,.5);
llMoveToTarget(Location, 5);
}
GetConfig()
{
kQuery = llGetNotecardLine("CarrageConfig", iLine);
iLine = 0;
}
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS, FALSE);
vector eul = <0,0,0>; //45 degrees around the z-axis, in Euler form
eul *= DEG_TO_RAD; //convert to radians
rotation quat = llEuler2Rot(eul); //convert to quaternion
llSetRot(quat); //rotate the object
llSleep(1);
llSetStatus(STATUS_PHYSICS, TRUE);
llSleep(1);
llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y , FALSE);
llSetStatus(STATUS_ROTATE_Z,FALSE);
llOwnerSay("Reading notecard..."

;
kQuery = llGetNotecardLine("CarrageConfig", iLine);
//llOwnerSay("Hello, Avatar!"

;
}
dataserver(key query_id, string data)
{
if (query_id == kQuery) {
// this is a line of our notecard
if (data == EOF) {
//llOwnerSay("No more lines in notecard, read " + (string)iLine + " lines."

;
GetConfig();
} else {
// increment line count
//llOwnerSay("Line " + (string)iLine + ": " + data);
list argv = llParseString2List(data, ["'"], [";"]);
Location = llToLower(llList2String(argv, 0));
Wait = llList2Integer(argv, 2);
Rotation = llList2Integer(argv, 4);
llOwnerSay(llToLower(llList2String(argv, 0)));
llOwnerSay(llToLower(llList2String(argv, 2)));
llOwnerSay(llToLower(llList2String(argv, 4)));
Move((vector) Location);
}
}
}
touch(integer total_number)
{
}
at_target(integer Vector_Target, vector targetpos, vector ourpos)
{
llTargetRemove(Vector_Target);
llSetStatus(STATUS_PHYSICS, FALSE);
vector eul = <0,0,Rotation>;
eul *= DEG_TO_RAD; //convert to radians
rotation quat = llEuler2Rot(eul); //convert to quaternion
llSetRot(quat); //rotate the object
if (Wait != 0) {
llSleep(Wait);
}
iLine++;
kQuery = llGetNotecardLine("CarrageConfig", iLine);
llSetStatus(STATUS_PHYSICS, TRUE);
}
}