Daniells Brandi
Resident-
Posts
38 -
Joined
-
Last visited
Reputation
1 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
mollymeus, your code is perfect, I did the test and saw that it does not work on physical objects. It would have some code like this for physical object. I need a seaplane to level (align) at height determined by user. I was working with 'VEHICLE_ANGULAR_MOTOR_DIRECTION' but the plane keeps going up or down even when the value set to 0, it makes the plane oscillate all the time, I need more precision I'm out of ideas.
-
yes, but I would like for example to rotate 10 degrees up, but without changing the direction of the prim. ///////////////////////////////////////////////////////////////////////// vector vOffset2 = <1,0,0> * llGetRot(); vector noY = <llVecMag(<vOffset2.x, vOffset2.y, 0.0>), 0.0, vOffset2.z>; integer pitch = llRound(llAtan2(noY.z, noY.x) * RAD_TO_DEG); ///////////////////////////////////////////////////////////////////////// would be the reverse process of this code. This code gives me the pitch, but I want the object to have a pitch set by me
-
I have a problem rotating a prim, I found some examples, but in the example, explain to rotate the prim in one of the 3 axes. I need the prim to rotate (up or down) always in front. The front would be the coordinate E on the world map and zero rotation on first rez. Thanks
-
Angle relative to a fixed point in the world.
Daniells Brandi replied to Daniells Brandi's topic in LSL Scripting
I think I could, in fact I just needed to multiply by -1. float angle = llAtan2(my_pos.x*-1,my_pos.y*-1) * RAD_TO_DEG; thanks again for the support. -
Angle relative to a fixed point in the world.
Daniells Brandi replied to Daniells Brandi's topic in LSL Scripting
Hello Innula Zenovka, I appreciate your help, but I still do not understand what I should do, I will try to illustrate better .. I have a fixed point on the world map, this point I already have. Example vector fix_point = <305310.70000, 234906.70000, 27.44904> indicated by the Red Point the image I only need x and y. I have my position on the world map using llGetRegionCorner()+llGetPos(); In real time. indicated by the Blue Point the image I have a compass that indicates my rotation in the world 80 ° in the picture I need to know, which direction (which angle ?° relative to the compass) I must take to get to this fixed point. In the example image, I know that I must take the 235 ° direction to get to the fixed point, but how to find the direction in the virtual world? (remembering that I will be moving, so this direction will not be fixed) I tried to use your formula, but I was unsuccessful, it really seems to be very difficult to work with angles. A second image as an example, I'm in another place in the world.... thanking for the help. -
Angle relative to a fixed point in the world.
Daniells Brandi replied to Daniells Brandi's topic in LSL Scripting
I want to know what angle I should follow to get to the fixed point, so I can align the angle of the compass with the angle I have to go to get to the fixed point. -
Angle relative to a fixed point in the world.
Daniells Brandi replied to Daniells Brandi's topic in LSL Scripting
Thanks for the help Mollymews. It seems a little difficult for me, so far I have a compass and managed to find the angle that I find myself in the world in relation to the fixed point. But what I need is to know which angle to follow to get to the fixed point. vector fix_point = <305310.70000, 234906.70000, 20>; //any position in the world default { state_entry() { llSetTimerEvent(0.1); } timer() { ///////////////////////////////////////////////////////////////////// //////////////// RELATION TO FIXED POINT ///////////////////////////// vector my_pos = (llGetRegionCorner()+llGetPos()); my_pos = my_pos - fix_point; float angle = llAtan2(my_pos.x,my_pos.y) * RAD_TO_DEG; if(angle < 0.0) angle += 360.0; angle * DEG_TO_RAD; ///////////////////////////////////////////////////////////////////// //////////////// COMPASS //////////////////////////////////////////// rotation currRot=llGetRot(); vector currEuler=llRot2Euler(currRot); float zRotAngle=currEuler.z; float heading=PI_BY_TWO-zRotAngle; while (heading<0) heading+=TWO_PI; heading=heading*RAD_TO_DEG; ///////////////////////////////////////////////////////////////////////// llSetText("Angle" + (string)angle + "° |" + "Compass=" + (string)heading + "°",<1,1,1>, TRUE ); ]); } } -
Angle relative to a fixed point in the world Hello, is it possible for me to find out which angle to follow to get to a fixed point in the world? Something like the image below ..
-
Working Great, thanks Rolig Loon
-
Hello guys, I need a quick cleanup of this string in http_response.. {"dat":[{"length":37,"rid":"pro.ts","text":["I just want this part of the string"]}]} I take only the part in bold thank you for help.
-
problem with camera ended a vehicle (plane) that uses only one configuration of dynamic camera but an error always happens almost always when exchanging island (when I go to a continent) was passed with a vehicle with a little rotation (bow making) the camera back to the correct position, but whenever we step from one island to another with the vehicle in a straight line, the camera is screwed (prey) and not the avatar back to the correct position, being sometimes even reversed (the correct position would be behind the avatar) I tried several changes, one of which was to update the camera whenever change, but still not got success. could someone help me? thanks
-
You can help me? I'm new to this script and the rotation is very difficult (
-
I could not do the same rotation that posted in the first post with this script. the object always rotate on only 1 axis
-
I could not do the same rotation that posted in the first post with this script. the object always rotate on only 1 axis
-
thank for help LepreLhaun but it works in vehicle?